Register for your free account! | Forgot your password?

You last visited: Today at 22:28

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

Advertisement



mysql_query("select

Discussion on mysql_query("select within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
mysql_query("select

Hallo

That My First Time To Use Mysql In Quest
So Litile Help PLz

You See In The Quest :
PHP Code:
        when login begin
        local title 
mysql_query("select * from player.news where id = '"..l.."' ")
        
local title_table = {}
        for 
1,table.getn(news),do
        
table.insert(title_table,news.title[i])
    
end
        local m 
select_table(title_table)
        
say_title(title_table[m]) 
Sql:
</b>
PHP Code:
CREATE TABLE `news` (
`
id`  int(16NOT NULL ,
`
title`  varchar(50NOT NULL ,
`
text1`  varchar(50NOT NULL ,
`
text2`  varchar(50NOT NULL ,
`
text3`  varchar(50NOT NULL ,
`
text4`  varchar(50NOT NULL ,
`
text5`  varchar(50NOT NULL ,
PRIMARY KEY (`id`)
)


But In The Sql I Write In
ID : 1
title : Test



It's Has To Be When I Login The Game
I Have To Get The Word That I Write In The Sql
But Nothing Show To Me

Sry For My Bed English
MrLibya is offline  
Old 05/07/2014, 17:22   #2
 
Ʀyuzaki's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 815
Received Thanks: 627
PHP Code:
        when login begin
        local title 
mysql_query("select * from player.news where id = '"..l.."' ")
        
local title_table = {}
        for 
1,table.getn(title),do
            
table.insert(title_table,title.title[i])
        
end
        local m 
select_table(title_table)
        
say_title(title_table[m]) 
Ʀyuzaki is offline  
Old 05/07/2014, 17:49   #3
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Not Work
MrLibya is offline  
Old 05/07/2014, 17:53   #4

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,446
Which mysql query function do you use?
Lord iRemix is offline  
Old 05/07/2014, 18:18   #5
 
elite*gold: 2
Join Date: Jun 2013
Posts: 1,063
Received Thanks: 1,724
PHP Code:
when login begin
    local title 
mysql_query("select * from player.news where id = '"..l.."' ")
    
local title_table = {}
    for 
1,table.getn(news),do
        
table.insert(title_table,news.title[i])
    
end
    local m 
select_table(title_table)
    
say_title(title_table[m]) 
There is no "news" table.

PHP Code:
when login begin
    local title 
mysql_query("select * from player.news where id = 1 ")
    
local title_table = {}
    for 
1,table.getn(title),do
        
table.insert(title_table,title.title[i])
    
end
    local m 
select_table(title_table)
    
say_title(title_table[m]) 
ProfessorEnte is offline  
Old 05/07/2014, 20:02   #6
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Quote:
Originally Posted by ProfessorEnte View Post
PHP Code:
when login begin
    local title 
mysql_query("select * from player.news where id = '"..l.."' ")
    
local title_table = {}
    for 
1,table.getn(news),do
        
table.insert(title_table,news.title[i])
    
end
    local m 
select_table(title_table)
    
say_title(title_table[m]) 
There is no "news" table.

PHP Code:
when login begin
    local title 
mysql_query("select * from player.news where id = '"..l.."' ")
    
local title_table = {}
    for 
1,table.getn(title),do
        
table.insert(title_table,title.title[i])
    
end
    local m 
select_table(title_table)
    
say_title(title_table[m]) 
There news table in plyer i make it

Quote:
Originally Posted by [iRemix] View Post
Which mysql query function do you use?
I Really Don't Know
My First Time To Use The Mysql , So I Don't Know Allot
MrLibya is offline  
Old 05/07/2014, 20:21   #7
 
elite*gold: 2
Join Date: Jun 2013
Posts: 1,063
Received Thanks: 1,724
Quote:
Originally Posted by MrLibya View Post
There news table in plyer i make it



I Really Don't Know
My First Time To Use The Mysql , So I Don't Know Allot
but there is no news table in your quest. You save the result of the query in the table " title" so you are only able to access the values through this table.
ProfessorEnte is offline  
Old 05/07/2014, 22:17   #8
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Can You Edit It To Make It save In news table ?
MrLibya is offline  
Old 05/08/2014, 07:11   #9
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,597
He already did!
Please keep your eyes open
Mijago is offline  
Old 05/08/2014, 10:55   #10
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Yes But Didn't Work
MrLibya is offline  
Reply


Similar Threads Similar Threads
Mysql_query(SELECT) into variable
05/04/2014 - Metin2 Private Server - 3 Replies
Hello, I have the problem.I need rewrite some informations with using mysql_query(SELECT) into my variable.I have table "pvp" in player into which is writing number of kills. There is my quest but It doesn't work. Could you help me please? Thx
[HELP] Disconnect 5101 on screen "Select Character"
02/17/2014 - Rohan - 2 Replies
i have a little problem, my server some user will disconnect 5101 on screen "Select Character". Can you tell me how to fix it. I do not know how to solve it. help me please..
SH Studio "Must select a valid model."
10/20/2012 - Shaiya - 7 Replies
Moin, wenn ich was in SH Studio änder, und es abspeichern will sagt er mir "You must select a valid model." Sufu konnte mir nichts sagen, weiß jeman wodran das liegt? Mfg. AdVHero /edit Ich will halt nur Stats verändern, nicht das Skin o.ä. Texte ändern, etc. nur das und nicht mehr^^



All times are GMT +1. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.