Re: PHP+MySQL=Help(?)

From: Date: Tue, 30 Oct 2001 18:35:04 +0000
Subject: Re: PHP+MySQL=Help(?)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72909@lists.php.net to get a copy of this message
On Tuesday 30 October 2001 10:13 am, turtle wrote: > <? > $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"; > $imglocation = 'imglocation'; > $height = 'height'; > $width = 'width'; > ?> You need to read the manual on the mysql functions. Specifically, functions like mysql_fetch_array, mysql_fetch_row, mysql_result. You're setting $imglocation to a string, not a returned result from mysql. You need to use one of the three functions I mentioned to retun an actual mysql result. --kurt

« previous php.general (#72909) next »