Problem with MySQL
#1

Hi. I have BlueG's MySQL R6.
I'm running a WampServer.
I have this code:
Код:
#define sql_host "localhost"
#define sql_user "root"
#define sql_pass ""
#define sql_db "vehsystem"

public OnFilterScriptInit() {
	print("\n----------------------------------------------------------\n");
	print("Vehicle System By Sphex - Loading...\n");
	print("\tLoading SQL...\n");
	if (mysql_connect(sql_host, sql_user, sql_db, sql_pass)) print("\t\tSQL Loaded successfully...\n");
	mysql_query("CREATE TABLE IF NOT EXISTS `cars`");
	print("Loaded successfully!\n");
	print("\n----------------------------------------------------------\n");
	return 1;
}
And it doesn't create any table!
Thanks.
Reply
#2

http://www.w3schools.com/sql/sql_create_table.asp


wrong syntax
Reply
#3

Yes I know, I had a mistake. Even when I fixed it, it didn't work. Even SELECT, INSERT and stuff doesn't work either.
upd: solved, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)