2 registered members (Ayumi, AndrewAMD),
1,112
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: CSmySQL New functions (SSL comming soon)
[Re: joh]
#305371
01/14/10 13:44
01/14/10 13:44
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
Expert
|
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
var char_id = 5; //we want the name of character number 5
str_for_num( strChar_id, char_id );
str_cpy( query, "SELECT name FROM characters WHERE char_id = " );
str_cat( query, strChar_id );
//do the mysql query with query string
Like that?
Last edited by Joozey; 01/14/10 13:45.
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
Re: CSmySQL New functions (SSL comming soon)
[Re: joh]
#305386
01/14/10 14:46
01/14/10 14:46
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
@jooz thanks to str_printf we can do
str_printf(query,"SELECT name FROM characters WHERE char_id = %d",(int)char_id);
instead of
str_for_num( strChar_id, char_id ); str_cpy( query, "SELECT name FROM characters WHERE char_id = " ); str_cat( query, strChar_id );
sorry for oftopic.
3333333333
|
|
|
Re: CSmySQL New functions (SSL comming soon)
[Re: SchokoKeks]
#305822
01/17/10 15:10
01/17/10 15:10
|
Joined: Jul 2004
Posts: 1,710
MMike
Serious User
|
Serious User
Joined: Jul 2004
Posts: 1,710
|
OH ok that on did... a6 dll works on a7 right? Thanks now i can test myself
Last edited by MMike; 01/17/10 15:10.
|
|
|
Re: CSmySQL New functions (SSL comming soon)
[Re: MMike]
#306015
01/19/10 01:21
01/19/10 01:21
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
Expert
|
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
Oh right, thanks Quadraxas . I'm too old fashioned. @joh: Not sure what you want, but you need to know what player you want to pull out of the database. if there is only one player, you can simply do "SELECT name FROM players" or something the like. If there are more players... I don't know how this DLL handles arrays, but you'd probably get the first result found returned.
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
|