Hey im writing a function to replace a row in a table,
first the row is deleted then the new one is inserted.
Im practicly there but my delete sql allthough not throwing an error does not delete the row.
Heres the code
$sql = "DELETE FROM gallery_$user WHERE gallery= '$GalleryTest' AND image= 'image1' ";
$run= @mysql_query($sql, $conn )
or die(" Could not delete");
$sql2 = "INSERT INTO gallery_$user( `gallery` ,
`image` ,
`category` ,
`description` ,
`location` ,
`time` )
VALUES (\"$GalleryTitle\",'image1',\"$Category\",\"$Description\",\"$Location\",\"$Stamp\");";
$run= @mysql_query($sql2, $conn )
or die(" Could not insert");
the insert script works so the delete script is definatly getting the Gallery test variable
and as its not error i guess its just not finding the row so it just inserts
This is how my table looks when i run the script
My Gallery image1 Friends anyway 16:13:01 21-08-2007
My Gallery image1 Friends anyway 16:12:08 21-08-2007
AS you cna see the new row is inserted but the old one isnt deleted
any ideas or links would be great thanks
Edit:
sorry guys as if by magic this is now working must of been an error with my server or browser displaying an old version of the page my bad