Jump to content

list info in the databases


bob2006

Recommended Posts

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

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.