6-27 19:34
Subject: Re: [PHP-WIN] Re: or die problem
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
e query returns false";
Stephen
- Original Message -
From: "Charles P. Killmer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 27, 2003 6:10 PM
Subject: RE: [PHP-WIN] Re: or die problem
If you notice he has it commented out. I doubt that that was
]
Sent: Friday, June 27, 2003 12:01 PM
To: Croskerry, Dan
Cc: Windows Helplist (PHP)
Subject: Re: [PHP-WIN] Re: or die problem
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 d
rom: "Croskerry, Dan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 27, 2003 5:43 PM
Subject: RE: [PHP-WIN] Re: or die problem
> It's a straight forward update statement. Like I said, it works, the data
is
> written to the DB even with the or d
sert failed")
-----Original Message-----
From: Shaffin Bhanji [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 12:39 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: or die problem
It might help if you can post your code snippet!
>>> &
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:
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