I want to create a table using the following script:
mysql_query("create table `".$mysql_table_prefix."query_log` (
query varchar(255),
time timestamp(14),
elapsed float(2),
results int,
key query_key(query)
)");
It gives me this error:
#1064 - 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 'mysql_query("create table `".$mysql_table_prefix."query_log` ( query varchar(25' at line 1
EDIT: I used sql tab in phpMyAdmin
What can I do?
The first error I see is that timestamp does not have a lenght. So this line:
time timestamp(14),
should be like this:
time timestamp,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With