RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
no rows were updated."; else echo "".$affected_rows." were updated."; -Kevin - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 2:16 PM Subject: RE: [PHP] te

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Kevin Stone
quot;".$affected_rows." were updated."; -Kevin - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 2:16 PM Subject: RE: [PHP] testing a query for success--code doesnt work > Just

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Chris Shiflett
> * if the update does not have anything to work on > it does not mean it is a failure! except when you > EXPECTED it to update something. Right, and the function doesn't care what you expect anyway. :-) > * i'm not sure whether "if ($query)" is the proper > way to check this. for trapping d

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
-Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 04, 2003 3:51 PM > To: [EMAIL PROTECTED] > Subject: [PHP] testing a query for success--code doesnt work > > > hi.. > posted a message about what the code was to test an update query

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Kevin Stone
uot; . mysql_error()); if (mysql_affected_rows() == 0) { echo "Query executed but no rows were affected"; exit; } - Kevin - Original Message - From: "Sunfire" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 1:51 PM Subject: [PHP] testin

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Sunfire
the record was actually updated } if i can get some code example for that...it would help tnx - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 3:46 PM Subject: RE: [PHP] testing a query for suc

Re: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Chris Hayes
At 21:51 4-2-2003, you wrote: hi.. posted a message about what the code was to test an update query to see if it was successfull using mysql and i tested my code and for some reason even if none of the fields were updated it still reports the success message... heres the code i have: $query=mysql

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
I think you want to use mysql_affected_rows -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:51 PM To: [EMAIL PROTECTED] Subject: [PHP] testing a query for success--code doesnt work hi.. posted a message about what the code was to test an

RE: [PHP] testing a query for success--code doesnt work

2003-02-04 Thread Edward Peloke
ebruary 04, 2003 3:51 PM To: [EMAIL PROTECTED] Subject: [PHP] testing a query for success--code doesnt work hi.. posted a message about what the code was to test an update query to see if it was successfull using mysql and i tested my code and for some reason even if none of the fields were update

[PHP] testing a query for success--code doesnt work

2003-02-04 Thread Sunfire
hi.. posted a message about what the code was to test an update query to see if it was successfull using mysql and i tested my code and for some reason even if none of the fields were updated it still reports the success message... heres the code i have: $query=mysql_query("update members set comp