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 Link to comment https://forums.phpfreaks.com/topic/17397-the-list-command-and-pear/ 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. Link to comment https://forums.phpfreaks.com/topic/17397-the-list-command-and-pear/#findComment-74014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.