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
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
> * 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
-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
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
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
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
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
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
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
10 matches
Mail list logo