Joseph,
Did the tutorial explain how to create the employees table and add data
to it? There is a command line tool (mysql) that lets you login directly
to the MySQL server and give it commands.
Here's a tutorial from the MySQL site:
http://www.mysql.com/documentation/mysql/bychapter/manual_Tut
Thanks Bj and Sheila,
This was cut and paste from a tutor course!Your variation produced
this:
1146: Table 'mydb.employees' doesn't exist
Which is more confusing than ever.Since MSDos set up the database
without confirming and was offended when I tried to set it up again, I
assumed the d
It doesn't like the value of $result. Try this.
$result = mysql_query("SELECT * FROM employees",$db);
if (!$result) {
echo mysql_errno() . ": " . mysql_error(). "\n";
} else {
printf("First Name: %s\n", mysql_result($result,0,"first"));
printf("Last Name: %s\n", mysql_result($result,0,"las
> From: "Joseph, Smile Poet"
> $db = mysql_connect("localhost", "root");
> mysql_select_db("mydb",$db);
> $result = mysql_query("SELECT * FROM employees",$db);
I'm not even sure that should work. I'm at the day job right now so can't check any
of my source code or the php help files. What you