Iterating through database query, and inserting into tables
Posted: Thu Feb 08, 2007 2:23 pm
Hey all..
I have a query that I'm grabbing from the db, and wish to insert the results into a table:
Then display the results into a table, with a few form items added.
::::::::: Checkbox ::::::::: Checkbox
Image1: Checkbox Image2: Checkbox
::::::::: Checkbox ::::::::: Checkbox
Image Name Image Name
What I'm not seeing, is how to insert into the table, while iterating through mysql_fetch_array. If I am iterating through the results, and am at Image1, the name result would need to be in a different row, that I wouldn't begin writing until after I had written the cells for image2.. Does that make sense? I'm struggling with how to verbalize it..
Thanks
David
I have a query that I'm grabbing from the db, and wish to insert the results into a table:
Code: Select all
$getGallery = "SELECT * FROM gallery";
$gallery = mysql_query($getGallery);::::::::: Checkbox ::::::::: Checkbox
Image1: Checkbox Image2: Checkbox
::::::::: Checkbox ::::::::: Checkbox
Image Name Image Name
What I'm not seeing, is how to insert into the table, while iterating through mysql_fetch_array. If I am iterating through the results, and am at Image1, the name result would need to be in a different row, that I wouldn't begin writing until after I had written the cells for image2.. Does that make sense? I'm struggling with how to verbalize it..
Thanks
David