On Tuesday 30 October 2001 11:58 am, turtle wrote:
> No reading that section of the manual did me no good.  I do not understand
> other than I cannot store the results as a variable.

yes, you can. 


> Is there any of what I have done that is usable?

yes, there is. see below.  It's probably not solid enough to cut 'n' paste, 
but it at least shows you how to get return results from mysql.

> A recommendation for a book that covers this would be helpful...  the
> manual on this area is way to abbreviated for someone who has only used PHP
> for 2 weeks.

"Beginning PHP4" by Wrox



<?
 $link = mysql_connect('localhost')or die ("Could not connect");
 mysql_select_db('img760')or die ("Could not select database");
 $query = "select imglocation,height,width from img where
        imgname=$getimg"; //****you haven't defined $getimg anywhere that I can see
                        // also need to enclose it in quotes: '$getimg'
  $results = mysql_fetch_array($query); //new line
 $imglocation = $reults['imglocation']; 
 $height = $results['height'];
 $width = $results['width'];
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to