I'm learning the PEAR db classes for querying mySQL databases and not far into the subject, I've hit a snag.
A simple variation of my code is as follows:
<?php /* include the config files up here */ $sel = $database_1->query("select email from users where field = '$value'"); // users table is made up of id,username,email,age list($email) = $sel->fetchRow(); echo $email; ?>
The above gives me the follwing error:
Notice: Undefined offset: 0 in .....path_to\getmail.php on line *
Can any of the pros advise of the issue?
Thanks in advance