About sql in php
Posted: Fri Dec 23, 2005 3:54 pm
Hi. I want to create a table named "job" like this:
But it is not creating. I think it's because of the "TEXT" type in the last column. But i have to use "TEXT" type for my project. So how can i create a column that has type "TEXT" like this?
Code: Select all
$query4 = "create table job(id INT PRIMARY KEY,
username VARCHAR(30) NOT NULL,
sdate DATE NOT NULL,
edate DATE NOT NULL,
company VARCHAR(30) NOT NULL,
location VARCHAR(30) NOT NULL,
position VARCHAR(30) NOT NULL,
desc TEXT NOT NULL)";
if (mysql_query($query4))
echo "Table job is created";
else
echo "Table job can't be created, mysqlerror()";