Query problem
Posted: Sat Jun 03, 2006 8:02 am
What's wrong with this query?
I get error
Using MySql version 4.0.23
Code: Select all
<?
$vrsta = 1;
include('con_db.php');
mysql_query("ALTER TABLE kriteriji ADD COLUMN $vrsta TEXT NOT NULL") or die (mysql_error());
?>Code: Select all
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1 TEXT NOT NULL' at line 1