To any other newbie reading this, Nhan was confusing the proccess of escaping (meaning escaping a special character with a backslash (\) with a built in fuction similar to trim (but specific to Mysql) that is called mysql_real_escape.
Or so that what I think is what just happened, but I'm a newb too and I might be mistaking.
Anyway, the issue was that I did not escape my query string.
the working query:
Code: Select all
$query0 = "SELECT sid FROM student_info WHERE first_name = '\"$fn\"' AND last_name = '\"$ln\"' AND dob = '\"$dob\"' " ;
this query does not yield any syntax errors, but it also does not return the results I was expecting.
I will need to create a seperate post for this issue to better describe it and show the whole script,
thank for all who assisted.