Try instead.
--
Jeff S.
"Mathias" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I use Microsoft Windows XP Pro, and PHP4. Im reading the book Sams teach
> yourself PHP, Mysql and Apache.
> I setup mysql apache2 and php4. I cannot get to work. Can
> anyone HELP PLEASE?!?!???
>
>
No, it is exactly the problem. || is only used in evaluation statements such
as if, while, etc etc. Or is used when something must return a value to
work, Or if it returns false (nothing), then to do the other section.
"Do This Query and Return True / a value"
OR "Do this if the query returns fals
If you notice he has it commented out. I doubt that that was the
problem.
I read somewhere a while ago about a difference in operator precedence
between || and or.
Perhaps the die is being invooked first?
Charles Killmer
-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]
S
Dan,
mssql_query($sql); // or die ("insert failed")
When you use or die, you must NOT have a ; on the end of the mssql_query
eg
mssql_query( $MyQuery )
OR die( 'Error' );
Notice the ; only goes on to the end of the or die command.
Stephen
- Original Message -
From: "Croskerry, Dan" <
It's a straight forward update statement. Like I said, it works, the data is
written to the DB even with the or die so I'm not sure why the die is
invoked.
$sql = "UPDATE Helpline SET morn_pers='".$FV['morn_pers']."',
aft_pers='".$FV['aft_pers']."', eve_pers='".$FV['eve_pers']."', ";
$sql .= " n
It might help if you can post your code snippet!
>>> "Croskerry, Dan" <[EMAIL PROTECTED]> 27/06/2003 12:28:13 pm >>>
There is no error message. It happens mostly when I am doing an update
or
insert statement. There is no problem with the sql because the data
gets
written to the db. If I use or die
Try echo mysql_query($your_query_here), because if returns false it will
die.
To figure out why it return false see how many_rows were affected with
mysql_affected_rows();
--
-
Cristian MARIN - Developer
InterAKT Online (www.interakt.ro)
Tel:
php-windows Digest 27 Jun 2003 16:28:15 - Issue 1798
Topics (messages 20587 through 20603):
Re: is_dir: runs bad under IIS/Win2K
20587 by: Nadim Attari
20588 by: Nadim Attari
20589 by: Nadim Attari
20597 by: morris71.libero.it
PHP application URL
2059
There is no error message. It happens mostly when I am doing an update or
insert statement. There is no problem with the sql because the data gets
written to the db. If I use or die it still writes to the db but the or die
kills the processing. It's strange.
-Original Message-
From: Cristi
Maybe not the query is the problem, maybe the connection or the
authentication ...
Try executing the sql without the die part and then print out the
mysql_error() if the mysql_errno()!=0
mysql_query($your_query_here);
if (mysql_errno()!=0){
die (mysql_error());
}
--
I'm new to the windows platform for php development and I have been having
problems with the or die function when running sql queries. It is being
called even when I run a valid query. I have tested it with valid queries
and it is always triggered. I have had to stop using it which is not good. I
n
The MSSQL dblib (used in the mssql extension) detects the codepage of the
environment it is running under.
Caling a php script with php.exe can be done in at least 3 ways:
1) From IIS as CGI- this sets the codepage to 125x (ANSI)
2) From a command line - this sets the code page to 437 or whatever
<[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Hi Felipe.
> First of all... the lacking double-quotes at the end ot the string! So,
the
> right way is:
> header("Location: validation.php?name=$name&mail=$mail&message=$message");
> This line works well if...
>
> Regarding your
Hi Felipe.
First of all... the lacking double-quotes at the end ot the string! So, the
right way is:
header("Location: validation.php?name=$name&mail=$mail&message=$message");
This line works well if...
Regarding your "question", the problem is in a uncorrect usage of the
variables while composing
Just a few notes about my problem!
It seems that PHP 4 on Windows 2000 with IIS 5.0 all directories of level 1
(starting from the "root") aren't visible as "directories".
In fact, I have tested some directory-paths with "is_dir" function, with
different paths and PHP is able to recognize only / (ro
Hello all,
I have a php page which calls another with header function. This is the
sintax:
header("Location: validation.php?name=$name&mail=$mail&message=$message);
The problem is that in the next php page, it only gets the first word of
the first variable, and it shows an error of no id
Thanks for your answer Melih.
I think both charsets are correct, I simply deactivated the automatic ANSI
to OEM conversion in the Client Network DB Library of mssql and all works
fine now... please, how can I check the character sets in both PHP & MSSQL?
I think in MSSQL have set de code page 1252,
Cristian,
The problem here is the code (in a PHP page, e.g. utils.php) will be called
from other PHP pages in my application. And I want to always get the same
URL, for example (http://myhost/myapp/). How to use the preg_replace
function to get my *base* URL?
-Original Message-
From: Cr
in fact better solution would be
$url = 'http://'.$_SERVER['HTTP_HOST'];
$url .=
isset($_SERVER['REQUEST_URI'])?$_SERVER['REQUEST_URI']:(empty($_SERVER['QUERY_STRING'])?$_SERVER['PATH_INFO']:($_SERVER['PATH_INFO'].'?'.$_SERVER['QUERY_STRING']));
don't think so?
---
To know the full URL of a called page you can use this:
$url='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ;
After this with preg_replace you can do what ever you want to with the URL.
--
-
Cristian MARIN - Developer
InterAKT Online (www
20 matches
Mail list logo