yeah I guess that's a bad title ... will put more useful titles before I post it in future. ... I have already got mysql working and have created a database with it. the problem is, as I see it, both php and mysql has been installed on the machine. php has already been configured to work with mysql but it still can't recognize the function used like mysql_connect(); my code looks like this -->
$db = mysql_connect("localhost", "root")
or die("Could not connect!");
mysql_select_db("myfirstdb",$db);
$result = mysql_query("SELECT * FROM person",$db);
printf("ID: %d<br>\n", mysql_result($result,0,"ID"));
printf("Name: %s<br>\n", mysql_result($result,0,"Name"));
printf("Position: %s<br>\n", mysql_result($result,0,"Position"));
printf("Remarks: %s<br>\n", mysql_result($result,0,"Remarks"));
?>
I keep getting the message as before :
Warning: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/first.php4 on line 13
Does anyone encounter this before? Thanx!