Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 11:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



FreeBSD LuaSQL - Mysql

Discussion on FreeBSD LuaSQL - Mysql within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2009
Posts: 28
Received Thanks: 13
FreeBSD LuaSQL - Mysql

There is an way to install luasql-mysql in freebsd and get it to work with metin2 quest?

cd /usr/ports/databases/luasql-mysql && make clean install

It create mysql.so in usr/local/lib/lua/lua5.1 but i can't get it to wok. I have exhausted all options......

Thx.

PS: I will be happy if someone have this function completed:
PHP Code:
int mysql_do_query(int *luabp)
{
    
int *result, *p_resi=0;
    
MYSQL_FIELD *field;
    
char *query, **row;
    
unsigned long long int num 0;
    
    
query lua_tostring(luabp,1);
    
result = (int *)DirectQuery(*DBManagerquery);
    
p_res = *(int**)result[3];

    if (!*
p_res) {
        
lua_pushnumber(luabp0);
        return 
0;
    }
    
lua_newtable(luabp);
    while(
row mysql_fetch_row(*p_res)) {
        while( 
field = (MYSQL_FIELD*)mysql_fetch_field(*p_res) ) {
            
lua_pushstring(luabp,field->name);
            if (
sscanf(row[i],"%llu", &num)) 
                
lua_pushnumber(luabpnum 1.0);
            else 
                
lua_pushstring(luabp,row[i]);
            
lua_rawset(luabp, -3);
            
i++;            
        }
    }
    return 
1;

It should work like this:

PHP Code:
local result sql.query("SELECT id, name FROM users;");
say(result[1].name)
say(result[3].name)
say(result[4].name)
But it displays only one rowsay(result.name
ionutxp is offline  
Old 06/19/2013, 19:12   #2
 
elite*gold: 0
Join Date: Jan 2013
Posts: 1
Received Thanks: 0
FreeBSD LuaSQL - Mysql

Hey

Nice to see someone other is working on these things.

I'll give you a feedback if i know more

PS: Sorry for my bad english, I'm from switzerland.
.DerPade is offline  
Old 06/20/2013, 00:13   #3

 
elite*gold: 0
Join Date: Mar 2010
Posts: 1,086
Received Thanks: 557
Why you install Lua sql?
RedKing2 is offline  
Reply


Similar Threads Similar Threads
FreeBSD 8.2 + Mysql 5.5.27
09/01/2012 - Metin2 Private Server - 2 Replies
Hallo, Undzwar habe ich ein problem mit dem erstellen des passwortes für meine Mysql Datenbank.Ich habe Mysql 5.5.27 installier und den Befehl: eingegeben,aber da kommt eine Fehlermeldung: http://www10.pic-upload.de/01.09.12/gn445w4fwapf. png In der "err" Datei im Mysql Ordner steht folgendes: 120901 09:39:19 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 120901 9:39:19 InnoDB: The InnoDB memory heap is disabled 120901 9:39:19 InnoDB: Mutexes and rw_locks use GCC...
Mysql für FreeBSD 8.2
07/09/2012 - Metin2 Private Server - 4 Replies
Hey würde gerne einen Mysql auf meinen FreeBSD machen also für nen Metin2 Server ^^ So Ich habe einmal dieses Tutorial Befolgt -> http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/1350050-howto-mysql-5-5-14-auf-fre ebsd-8-2-installieren.html Nur es ist eine Alte Mysql Version ! Und ich finde kein "HowTo" von einer neueren Version ! Oder ich weiß nicht wie ich eine Neue Bekomme ! Den mit dieser Kann ich nichteinmal Backups machen oder Queris einfügen -.-"
MySQL auf FreeBSD 8.1?
11/28/2011 - Metin2 Private Server - 0 Replies
Hey ich wollte mal fragen ob es möglich ist MySQL auf einem FreeBSD 8.1 Root zu installieren? Wenn es möglich ist, kann jd. mir sagen wie ich dies am anstelle?;D Danke ^^
[HELP] Mysql auf freebsd
10/11/2011 - Metin2 Private Server - 2 Replies
Hey irgendwie krieg ich das net hin, mysql auf mein freebsd 7.2 32 bit root zu installieren... Würde mir das freundlicherweise jmd. machen?? gebe dafür 15€ psc 10€ + 10€ icq 578768111
MySQL 5.0 auf FreeBSD
05/07/2011 - Metin2 Private Server - 8 Replies
Hallo, ja ich weiß das gehört nicht in die Metin2 Section aber da hier die meisten reingucken werden und sich auskennen frage ich hier :) So, ich möchte wie ihr es laut Überschrift schon gelesen habt MySQL 5.0 auf FreeBSD installieren. Ok, kommt mir jetzt bitte nicht mit SuFu oder Google an für ein Tutorial :P Ich habe dieses Tutorial (klick mich) befolgt. Wenn ich dies hier eingebe dann kommt ne Fehlermeldung. make install clean Fehlermeldung: ===> Extracting for mysql-client-5.0.92...



All times are GMT +2. The time now is 11:23.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.