bob2006 Posted April 23, 2007 Share Posted April 23, 2007 how are all of you guys doing i need a little help im trying to list every username in my database i know that you have to take out the where un the mysql query any way here what i got <? include'db.php'; if(!isset($_REQUEST[sid])) { session_start(); $sid=session_id(); } $username=$_SESSION['username']; mysql_query("SELECT * FROM users username='$username'; ") or die(mysql_error()); //Display 5 most recent blogs echo"<table> <tr>$username </tr>"; ?> but it keeps giveing me 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 '='admin'' at line 1 can you please help Link to comment https://forums.phpfreaks.com/topic/48279-list-info-in-the-databases/ Share on other sites More sharing options...
trq Posted April 23, 2007 Share Posted April 23, 2007 SELECT username FROM users Link to comment https://forums.phpfreaks.com/topic/48279-list-info-in-the-databases/#findComment-236015 Share on other sites More sharing options...
bob2006 Posted April 23, 2007 Author Share Posted April 23, 2007 now it is only pulling my username out Link to comment https://forums.phpfreaks.com/topic/48279-list-info-in-the-databases/#findComment-236020 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.