Then, I want to select the contents of the image field from the temporary table, and write it into a permanent table, however an a little unsure about the process.
Selecting the file from the temporary table:
Code: Select all
$image = mysql_query("SELECT image FROM holdingtable WHERE name='$imageone'")
or die(mysql_error());
$imagearray = mysql_fetch_array( $image )
or die(mysql_error());
$oldimage = $imagearray['image'] ;
// Then inserting:
mysql_query("INSERT INTO permtable (image) VALUES ('$oldimage ')");Long story short, my question is, do I need to use mysql_fetch_array, or is there another process? When I don't use it, and just run the query:
Code: Select all
mysql_query("INSERT INTO permtable (image) VALUES ('$image')");Or in other words, how can I copy the image contents (a.k.a. The actual file) from one table to another?
Thanks everybody.