To view the terms under which this email is distributed, please go to

On 03 December 2004 13:15, Yemi Obembe wrote:

> $sql = "SELECT * FROM arcadia WHERE email=$v";

>    $sql_in = "INSERT INTO arcadia ('email') VALUES ('$v')";

Spot the difference: you have quoted the email value $v in the INSERT
(correct) but not in the SELECT (wrong).  This means that:

   $res = mysql_query( $sql ) ; 

is failing with a SQL error, so $res is not being set to a valid MySQL
result resource, so that when you execute:

   if (list($row) = mysql_fetch_array($res)) {

The mysql_fetch_array() complains with the error you have seen.

After any database operation, you should check for failure and echo out any
error message -- see mysql_errno()  ( and
mysql_error() (



Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to