0

so i have a table called image: ->image_id, user_id, img, name

and i want to del one row where image_id = 3;

$del = mysql_query("DELETE  image WHERE image_id = '$image_id_g'");

i want to del whole row not just image_id.

iam not sure if this will del whole row

Edited by hwoarang69

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by JorgeM
0

The SQL Delete syntax is not correct. it should be:

DELETE FROM image WHERE image_id = '$image_id_g'

This will delete all rows that match the image_id value. If this field has unique data, then only one row will be deleted.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.