Need support

Started by Cool, Nov 05, 2016, 10:11 AM

Previous topic - Next topic

Cool

Please Help me in migrating my server from sqlite to mysql i wana which which things i need to change from server for mysql
like in sqlite its SqlQuery and in mysql its mysql_query please Tell me others things which need to change or please make somthing like this for me like slc did for his plugin ConnectSQL <- SQLite_Open;
DisconnectSQL <- SQLite_Close;
QuerySQL <- SQLite_Query;
GetSQLNextRow <- SQLite_NextRow;
GetSQLColumnCount <- SQLite_ColumnCount;
GetSQLColumnData <- SQLite_ColumnData;
FreeSQLQuery <- SQLite_Release;
escapeSQLString <- SQLite_Escape;

EK.IceFlake

You can't without your own special function. They work differently.

Cool

what mean i want know which things need changes?

KAKAN

There's nothing like GetSQLNextRow in MySQL. Things work differently in MySQL.
oh no

Cool

#4
Ok Thanks and is it correct for mysql CREATE TABLE IF NOT EXISTS Accounts ( Name VARCHAR(255), NameLower VARCHAR(255), Password VARCHAR(255), Cash INT, Bank INT, Kills INT, Deaths INT, Level INT, LastUsedIP VARCHAR(255) )
and
function onPickupPickedUp( player, pickup )

if(pickup.Model == 407)
{
local id = pickup.ID+1, q = mysql_query(sqliteDB,"SELECT * FROM Properties WHERE PropertyID='"+id+"'");
if( mysql_num_rows( query ) !== Null ){
{
local result = mysql_fetch_assoc( query );
Name = result[ "Name" ];
Owner = result[ "Owner" ];
Sharer = result[ "Sharer" ];
Price = result[ "Deaths" ];
MessagePlayer(" [#4682B4][Info][#FFFFFF]ID: "+id+", Property Name ("+name+"), Price ("+price+"), Owner ("+owner+"), Sharer ("+sharer+")",player);
}
else return;
mysql_free_result( query );
pickup.RespawnTime = 5000;
}

Xmair

You don't use ''s while using integers in SQL.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Cool

Quote from: Xmair on Nov 06, 2016, 06:50 AMYou don't use ''s while using integers in SQL.
in which things can you give me an example