Jump to content

the "list" command and PEAR


a1ias

Recommended Posts

Hi all

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:

[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,age

list($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 advance

a1ias
Link to comment
https://forums.phpfreaks.com/topic/17397-the-list-command-and-pear/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.