View Single Post
  #1  
Old 03-28-2007, 05:23 AM
Drichek Drichek is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Drichek is on a distinguished road
Default deleting a group....?

Hi guys,
I am using PHP and trying to delete all of the rows associated with a certain username. It's giving me an error.

// Deletes the user's characters from the Characters table...
$deletechars="DELETE * FROM Characters WHERE username='$myusername'";
if (!mysql_query($deletechars,$con))
{
die(mysql_error());
}

and it gives me error:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM Characters WHERE username='steve'' at line 1

Is this not the way to delete a group of certain rows from a table?
Thanks, -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - deleting a group....?
View Single Post
  #1  
Old 03-28-2007, 05:23 AM
Drichek Drichek is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Drichek is on a distinguished road
Default deleting a group....?

Hi guys,
I am using PHP and trying to delete all of the rows associated with a certain username. It's giving me an error.

// Deletes the user's characters from the Characters table...
$deletechars="DELETE * FROM Characters WHERE username='$myusername'";
if (!mysql_query($deletechars,$con))
{
die(mysql_error());
}

and it gives me error:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM Characters WHERE username='steve'' at line 1

Is this not the way to delete a group of certain rows from a table?
Thanks, -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote