The following example shows a table structure in my database:
At the top, the table name is displayed as--Table: guestbook. If you click 'Structure' tab,
you can see the table structure. My 'guestbook' table consists of 4 fields or columns--comm_id,
name, comment and datetime. So, what you are saying 'a row called pic', means actually a field
or column called pic.
In my case, $row = mysql_fetch_array($result)--means one line of data expressed in an array having
4 elements (fields).
Quote:
the database consists of the following rows.
Name
ingredients
instructions
category
Image.
|
The above shows your table schema. Here, $row['Image'] is the field (an element of the array), where
the image path to be saved. So, you can save the path in 'Image' field as images/maritinglass.jpg.
Added later:
You can save the image path by making an update query similar to below:
$query = "update table_name set Image = 'images/maritinglass.jpg' where Name='$name'";
mysql_query($query);