a1ias Posted August 13, 2006 Share Posted August 13, 2006 Hi allI'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:[code]<?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,agelist($email) = $sel->fetchRow();echo $email;?>[/code]The above gives me the follwing error:[i]Notice: Undefined offset: 0 in .....path_to\getmail.php on line *[/i]Can any of the pros advise of the issue?Thanks in advancea1ias Quote Link to comment Share on other sites More sharing options...
a1ias Posted August 13, 2006 Author Share Posted August 13, 2006 forget to mention that the fetchmode has been set to (DB_FETCHMODE_ASSOC) in the config files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.