retrieve data from mysql db
| From: | gert vonck | Date: | Sat, 22 Mar 2003 01:25:58 +0000 |
| Subject: | retrieve data from mysql db | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140656@lists.php.net to get a copy of this message | ||
hello,
i'm not very good with php and mysql, so this can look like a silly easy question.
I have a mysql database named 'oh'. there are 20 tables under it.
Now, i want to retrieve 1 image and some text (8 to be exact), and store them in a table with php-code.
I want to have 1 table with 3 column, and the first two are divided into 8 rows each.
1st column, 1st row, shows like this example : the boss :
2nd column, 1st row, shows : mr.Van dooren3rd column is for image) what i should retrieve from my table is the actual name of the field (boss), the value of that field (mr.Van dooren) en one time an image. How can i load them into such a table? with this code, i can show 1 image. :os <?php $sql = @mysql_query("SELECT picture_right FROM info_general") or die (mysql_error()); while($a_row = mysql_fetch_array($sql)) { $img_1= $a_row["picture_right"]; } mysql_close(); ?> <img src="<? echo($img_1); ?>"> Can someone help me please? Mvg, Gert Vonck _________________________________________________________________