I agree, the PEAR result is 'nice' result, but requires a complete 
understanding and total implementation.

The question was how to select more than one answer from 'tablename'.

>Ok. This might be a odd question to some but, in my learning of the 
user
>of php with mysql, this is how I learned to get values...
>
>$sql = "SELECT x FROM tablename WHERE a = '".$a."'";
>    $result = mysql_query($sql);
>       while ($row = mysql_fetch_array($result) ) {
>          $x = $row['x'];
>       }
>

Your possible problem lies in the WHERE statement. If you only have 
ONE instance where 'a' is equal to '$a', then it will return only one 
result.
If the are one hundred 'a's that match the value of '$a', then you 
will get one hundred results.


If $a is a social security number, you only get one result.
if $a was "Boston", you might many results.

Run the same script, but remove 'WHERE a=$a'  [WHERE a = '".$a."']

Try $sql = "SELECT * FROM tablename" , you should return EVERY RECORD 
in the table 'tablename'.

Have Fun.

Mistress Kizz

-------------------------------------------------------
Sometimes LESS is MORE. I wish I could be LESS broke MORE often.






The PHP_mySQL group is dedicated to learn more about the PHP_mySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to