I need to get an to get the user_id of the username which I'm sending as a value to the db. The problem is i can't get it working. Maybe this is because the feld user_id is BEFORE the field username. Like this: user_id | username | password and so on.
So is there anyway to tell in sql to look up before that field???
Here is the code I used:
<?php include("dbconnect.php");
$sql_query = "SELECT * FROM ss_users WHERE username='".$DBusername."' AND user_id=''";
$result = mysql_query($sql_query) or die ("Fehl0r!");
echo $user_id;
mysql_free_result($result);
mysql_close();
?>
Hope somebody can help me...