Jump to content

Selecting Everything in one row


ryanmetzler3

Recommended Posts

I have a mysql table named store. In that table there are the following rows: name, date, location, and imagelocation. Right now I have this code:

@$term = $_POST['term'];
		$sql = mysql_query("select * from store where name = '$term'");
		$numberofrows=mysql_num_rows($sql);
		while ($row = mysql_fetch_array($sql)) {
			$imgurl = $row['imagelocation'];
			echo "<img id='uploadstyle' src=$imgurl>" . "<br/>";  

Basically the user inputs a name into the form on the site and it displays the 'imagelocation' associated with that name. How can I write some MYSQL to select everything in the 'imagelocation' column and display it?

 

Link to comment
https://forums.phpfreaks.com/topic/281716-selecting-everything-in-one-row/
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.