Hi,
I'm new to mysql database design, 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 : 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
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php