Jump to content

[SOLVED] Query Help


steviez

Recommended Posts

Well do you know how to join tables? If so, you can do it all in 1 query.

 

But just change your code:

$sql = "DELETE FROM user WHERE id = '$UsErId'";

$result = mysql_query($sql) or die(mysql_error());

$sql = "DELETE FROM audio WHERE userid = '$UsErId'";

$result = mysql_query($sql) or die(mysql_error());

$sql = "DELETE FROM photos WHERE userid = '$UsErId'";

$result = mysql_query($sql) or die(mysql_error());

Link to comment
https://forums.phpfreaks.com/topic/37694-solved-query-help/#findComment-180284
Share on other sites

I'm new too, but I'm gonna give this a shot

 

your query $sql = "DELETE FROM user WHERE id = '$UsErId'";

deletes a single row right?

 

To delete multiple rows try

 

$sql = "DELETE FROM user,audio, etc WHERE id = '$UsErId'";

 

or if that doesn't work

 

$sql = "DELETE FROM user && audio && etc WHERE id = '$UsErId'";

 

 

that's my best shot

Link to comment
https://forums.phpfreaks.com/topic/37694-solved-query-help/#findComment-180286
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.