Jump to content

Need Help with proper SQL Syntax for Where


renfley

Recommended Posts

Hey guys i need some help!!

 

when someone logs in i create a session called $_SESSION['username']

 

i want to display only ticket that the logged in user owns

 

$data = mysql_query("SELECT * FROM tickets where owner_id='$_SESSION['username']'") or die(mysql_error());

 

But im not sure my syntax is correct anyone care to help me out?

 

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.