Hi,
I'm new to PHP web design, I'm using Mysql and PHP. I have a PHP script to DELETE records but before that I need to be sure that the record exists.
My script goes like this:
line 6 $var1 = " select * from table.field where id_record = '$record' ";
line 7 if( $var2=mysql_fetch_array $var1) )
line 8 {
line 9 deleting ...
line 10 }
line 11 else
line 12 {
line 13 record does not exit ...
line 14 "It is not a valid record"
line 15 }
So when I test it with a record I know it doesn't exist, the script gives me
the message ("It is not a valid record") and this message: Warning: Supplied argument is not a valid MySQL result resource in
c:\apache\htdocs\nuevo\icum\eliminar.php on line 7
Any help will be appreciated
Alfredo Palafox