It seems I've done something that is causing the following error when I try to
delete a contact from within the contacts details:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/content/89/7462689/html/cms/delete.php on line 14
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/content/89/7462689/html/cms/include/address.class.php on
line 18
The record deletes ok if I place a check next to it from the main page. Any
clues on where I should look first?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
It seems I've done something that is causing the following error when I try to
delete a contact from within the contacts details:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/content/89/7462689/html/cms/delete.php on line 14
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/content/89/7462689/html/cms/include/address.class.php on
line 18
The record deletes ok if I place a check next to it from the main page. Any
clues on where I should look first?
Oh, and I'm using the latest version.
Ok, after researching and echoing code I discovered on or around line 390 in
dbconnect.php, it had the following:
$part_sql = $table."id = '$id'";
I changed it to:
$part_sql = $id;
And it works. Is this an error in the code or is it still something I did?
Hi, this is an error in the code and should already be fixed in the most
recent version.
Thanks for helping O., hope you stay with PHP-Addressbook
I was wrong, don't do what I posted on step 3 above. This will delete the
entire database.
Instead where it says:
$part_sql = $table."id = '$id'";
just add a period before id:
$part_sql = $table.".id = '$id'";
Without the period, the MySQL syntax is wrong and generates an incorrect value
for MYSQL_NUM_ROWS.
Hi CrCool,
Just download the most recent release. This should fix the bug too.
Regards O.