Raised This Month: $ Target: $400
 0% 

SQLx Read data from a SQL query...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-01-2007 , 22:11   SQLx Read data from a SQL query...
Reply With Quote #1

I talked to bail on IRC, but didn't really understand what he meant.. He said to use SQL_ReadResult, but I do not understand how to actually pick something out of the SQL table without knowing the value beforehand.

Look:

Code:
SQL_PrepareQuery(SqlConnection,"SELECT * FROM Points WHERE playerID = '0'")
But how do I just check the value of playerID?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
gxti
New Member
Join Date: Nov 2006
Old 01-01-2007 , 22:36   Re: SQLx Read data from a SQL query...
Reply With Quote #2

Quote:
Originally Posted by SweatyBanana View Post
I talked to bail on IRC, but didn't really understand what he meant.. He said to use SQL_ReadResult, but I do not understand how to actually pick something out of the SQL table without knowing the value beforehand.

First off, what are you trying to accomplish? Get the playerID given some other column's value? Get all playerIDs in the table?
gxti is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-01-2007 , 22:43   Re: SQLx Read data from a SQL query...
Reply With Quote #3

There is only going to be one playerID value.. It will increase every time someone enters any one of the servers. It is like the #userid in game.

It will be overwritten.

I just need to check the value of it..

I think a general query would be something like this:

Code:
SQL_PrepareQuery(SqlConnection,"SELECT * FROM Points")
but how would I pull one value?

Last edited by SweatyBanana; 01-01-2007 at 22:49.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-02-2007 , 01:54   Re: SQLx Read data from a SQL query...
Reply With Quote #4

Hawk answered my question.


Anyway, new question!

If I want to get and set the same INT in client_putinserver, would I have to make two completely different queries or what?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Reply



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

Forum Jump


All times are GMT -4. The time now is 22:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode