I tried this code to create a table in MySql 
saved it as "Emptable"
tried loading it on browser
got the following error

php fatal error.Call to undefined function mysql_connect() in 
C:\Inetpub.wwwroot\sakec

(Note- other simple pages in php r working fine and i can create a 
table(same query) in MySql using cmd prompt)

The Code:
<?php
mysql_connect("localhost","mysql","mysql") or die(mysql_error());
mysql_select_db("sakec") or die(mysql_error());
mysql_query("CREATE TABLE employee(empid VARCHAR(10) PRIMARY KEY, 
libid VARCHAR(10),empname VARCHAR(30), division VARCHAR(10), 
designation VARCHAR(20), emailid VARCHAR(30), password VARCHAR(15), 
date_time TIMESTAMP)") or die(mysql_error());
echo("table created");
?>

plz help

Reply via email to