SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 05/01/2020, 11:06 AM   #1
Hazon
Big Clucker
 
Hazon's Avatar
 
Join Date: May 2018
Location: Who cares ?
Posts: 172
Reputation: 29
Default MySQL.

Code:
error 017: undefined symbol "CREATE"
error 017: undefined symbol "TABLE"
error 017: undefined symbol "IF"
fatal error 107: too many error messages on one line

Code:
	CREATE TABLE IF NOT EXISTS `gang` (
		`id` int(10) NOT NULL AUTO_INCREMENT,
		`name` varchar(30) NOT NULL DEFAULT '-',
		`tag` varchar(5) NOT NULL DEFAULT '-',
		`color` int(11) NOT NULL DEFAULT '-1',
		`founder` varchar(30) NOT NULL DEFAULT '-',
	    `score` int(10) NOT NULL DEFAULT '0',
	    PRIMARY KEY (`id`)
	    ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;

	CREATE TABLE IF NOT EXISTS `users` (
		`id` int(10) NOT NULL AUTO_INCREMENT,
		`name` varchar(30) NOT NULL DEFAULT '-',
		`gangid` int(10) NOT NULL DEFAULT '-1',
		`gangrank` int(11) NOT NULL DEFAULT '0',
	    PRIMARY KEY (`id`)
	    ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;

	CREATE TABLE IF NOT EXISTS `gzone` (
	  `id` int(10) NOT NULL AUTO_INCREMENT,
	  `name` varchar(20) NOT NULL DEFAULT 'None',
	  `ownedby` int(11) NOT NULL DEFAULT -1,
	  `zminx` float(14,4) DEFAULT NULL,
	  `zminy` float(14,4) DEFAULT NULL,
	  `zmaxx` float(14,4) DEFAULT NULL,
	  `zmaxy` float(14,4) DEFAULT NULL,
	  PRIMARY KEY (`id`)
	) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
Hazon is offline   Reply With Quote
Old 05/01/2020, 11:20 AM   #2
AjaxM
Big Clucker
 
AjaxM's Avatar
 
Join Date: May 2016
Posts: 173
Reputation: 27
Default Re: MySQL.

You should use the MySQL function mysql_tquery(mysql, "YOUR CREATE TABLE STUFFS HERE");
__________________
Website | Forums| IP: 51.255.215.208:7817
AjaxM is offline   Reply With Quote
Old 05/01/2020, 04:26 PM   #3
Hazon
Big Clucker
 
Hazon's Avatar
 
Join Date: May 2018
Location: Who cares ?
Posts: 172
Reputation: 29
Default Re: MySQL.

How ?
Hazon is offline   Reply With Quote
Old 05/01/2020, 05:20 PM   #4
oghabanjb
Little Clucker
 
Join Date: May 2018
Posts: 37
Reputation: 1
Default Re: MySQL.

See:
https://wiki.sa-mp.com/wiki/MySQL#mysql_tquery and https://wiki.sa-mp.com/wiki/MySQL#mysql_pquery
__________________
+REP if I helped you.
Sorry for my bad english.
oghabanjb is offline   Reply With Quote
Old 06/01/2020, 12:08 AM   #5
KevTheJoker
Big Clucker
 
KevTheJoker's Avatar
 
Join Date: Dec 2018
Posts: 51
Reputation: 6
Default Re: MySQL.

You should create a .sql file and paste the code into it, then save. Afterwards, upload it to your database, via any website that supports MySQL, i.e. phpMyAdmin.
KevTheJoker is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Plugin r39-2 Error: Can't connect to local MySQL server through socket Emre__ Scripting Help 10 30/07/2014 08:26 AM
[Tutorial] [VIDEO] MySQL ORM r38: How to pair GM with MySQL & creation of registration/connection system cArnasLT Tutorials 3 19/05/2014 02:08 PM
[GameMode] MySQL CLEAN GAMEMODE [Whirlpool, MySQL BlueG R7, Cache, Ready Package (Windows)] GiamPy. Gamemode Scripts 13 13/09/2013 04:31 PM
BlueG MySQL plugin - Failed (plugins/mysql.so: undefined symbol: _Z13stringvprintfPKcPc) linuxthefish Plugin Development 10 13/07/2013 10:56 AM
[Tool/Web/Other] MySQL DB Manager - Easily manage your MySQL databases with this remote application fiki574 Tools and Files 13 22/07/2012 09:41 AM


All times are GMT. The time now is 07:45 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.