I am close to finishing a project I am working on. Here is the issue, I have a table that holds r_id,race_name, name, et, and mph. I have the sort down:
PHP Code:
$result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "ns_qualifying_results where r_id='$r_id' ORDER BY et, mph DESC LIMIT 16");
from there I need to just pull the names then enter it in a new table called ns_round1_results. This table holds the top 16 qualifiers. The query would look like the following:
PHP Code:
$db->query_write("INSERT INTO " . TABLE_PREFIX . "ns_round1_results (race_name,r1_name_rd1,r2_name_rd1,r3_name_rd1,r4_name_rd1,r5_name_rd1,r6_name_rd1,r7_name_rd1,r8_name_rd1,r9_name_rd1,r10_name_rd1,r11_name_rd1,r12_name_rd1,r13_name_rd1,r14_name_rd1,r15_name_rd1,r16_name_rd1, r_id) VALUES ('" . $race . "','" . $name0. "','" . $name1. "','" . $name2. "','" . $name3. "','" . $name4. "','" . $name5. "','" . $name6. "','" . $name7. "','" . $name8. "','" . $name9. "','" . $name10. "','" . $name11. "','" . $name12. "','" . $name13. "','" . $name14. "','" . $name15. "','".$r_id."')");
my question is how do I sanitize the $db->mysql_read so I can enter the name in the proper qualifying position? Any ideas?