0

Hi I'm trying to be able to pull user information from a Heidisql table. Using a recordset I was able to pull cand_id and set_nbr, but not the actual response, which is the most important aspect. The code I'm working with is:

$GETURLCAND_ID = $_GET;
$GETURLSET_NBR = $_GET;
mysql_select_db($database_episcopalgbec, $episcopalgbec);
$query_rs_answer = "SELECT score_detail.candidate_id, score_detail.candidate_answer, score_detail.set_nbr FROM score_detail WHERE score_detail.candidate_id = '$GETURLCAND_ID' and score_detail.set_nbr = '$GETURLSET_NBR'";

Does anyone have any advice on what to do? Thanks

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by ShawnCplus
0

Well given that you're only pulling data from one table adding the table name in front of each field is unnecessary. Just try SELECT * FROM score_detail WHERE candidate_id = '$GETURLCAND_ID' and set_nbr = '$GETURLSET_NBR' Also, as a little heads up. You aren't cleaning your get data in the least. If the data in question will interact directly with the database in any way you should either sanitize it or send it as POST.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.