bob2006 Posted April 25, 2007 Share Posted April 25, 2007 i should know what the problem is but i dont so can someone look at this code and tell me why im getting this 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 admin where username='' LIMIT 1' at line 1 if($_GET['del'] == "admin2") { $drop=mysql_query(" DROP from admin where username='$usernam2' LIMIT 1 ")or die(mysql_error()); }else thank you Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/ Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 $username2 vs $usernam2?? Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237929 Share on other sites More sharing options...
bob2006 Posted April 25, 2007 Author Share Posted April 25, 2007 $username is being taking up allready by the script so i had to change the veriable Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237931 Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 are you deleting a user here? Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237933 Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 drop is for tables delete is for users... Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237934 Share on other sites More sharing options...
bob2006 Posted April 25, 2007 Author Share Posted April 25, 2007 yes im deleting a user that i select fron the page be for it Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237935 Share on other sites More sharing options...
trq Posted April 25, 2007 Share Posted April 25, 2007 yes im deleting a user that i select fron the page be for it That is not what DROP is for. Try... $drop = mysql_query("DELETE FROM admin WHERE username='$usernam2'") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237937 Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 yuppers. Link to comment https://forums.phpfreaks.com/topic/48592-need-a-little-help/#findComment-237939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.