Answer the question
In order to leave comments, you need to log in
How to process SQL query correctly?
Good day to all!
There is
$id = mysql_result($res,0,"id") or die(mysql_error());
Answer the question
In order to leave comments, you need to log in
Some people say that I'm nervous.
Well, how can you not be nervous when you see such a monkey * code, the focus of sin and vice?
Well, how can you manage to make SO many mistakes in one line?
Guga, my boy. If you continue to write all this, then you will go to hell.
Here, see how to actually process the SQL query correctly:
$stmt = $pdo->prepare("SELECT id FROM users WHERE email =?");
$stmt->execute([$email]);
$id = $stmt->fetchColumn();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question