HI.
I just started learning mysql.
I am connecting to my database but i am having trouble printing out any of my fields. Here is the code i am using.
$db = mysql_connect(\"localhost\", \"root\");
mysql_select_db(\"mydb\",$db);
$result = mysql_query(\"SELECT * FROM employees\",$db);
printf(\"First Name: %s<br>\n\", mysql_result($result,0,\"first\"));
I can connect because it does not give me an error like before but that printf statement doesnt seem to work for me. I get an error about it not being a valid result resource.
I am not sure what that 0 means in the printf statement.
Thanks.