At 8/16/2002, you wrote: >Hi, >in the piece of code given below >----------- >$qid = mysql_query(" > SELECT * > FROM 1_nodedata > WHERE id = $edit_id > "); > $frm = mysql_fetch_array($qid); >----------- >i get the follownig error: > >Warning: Supplied argument is not a valid MySQL result resource in >/z/mercury/www/niksun/admin/add_doc.php on line 107 >element type: > >What is it happening so!!
$qid = mysql_query(" SELECT * FROM 1_nodedata WHERE id = '$edit_id' "); if (!$qid ) { print mysql_error(); exit; } $frm = mysql_fetch_array($qid); or $qid = mysql_query(" SELECT * FROM 1_nodedata WHERE id = '$edit_id' "); if (!$qid ) { print mysql_error(); } if ($qid ) { $frm = mysql_fetch_array($qid); } ------------------------- Pekka Saarinen http://photography-on-the.net ------------------------- --------------------------------------------------------------------- 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