Raised This Month: $ Target: $400
 0% 

sql-problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lagbeast
Junior Member
Join Date: Jul 2007
Old 07-04-2007 , 20:33   Re: sql-problem
Reply With Quote #1

Alright. I used hawks code instead and it works now. Now ive been looking here http://www.amxmodx.org/funcwiki.php?go=func&id=1105 at the SQLReadResult, and i get it working, now i just dont know how to get out the info.

PHP Code:
 // run a random query
    
new Handle:Query SQL_PrepareQuery(SqlConnection,"SELECT * FROM login")
 
    
// run the query
    
if(!SQL_Execute(Query))
    {
        
// if there were any problems
        
SQL_QueryError(Query,g_Error,511)
        
set_fail_state(g_Error)
    }
 
    
// checks to make sure there's more results
    // notice that it starts at the first row, rather than null
    
new Data
    
while(SQL_MoreResults(Query))
    {
        
// columns start at 0
        
Data SQL_ReadResult(Query,1)
 
        
server_print("Found data: %d",Data)
        
SQL_NextRow(Query)
    } 
Example: I have a table named login and i want to get out the info in the second column called nick and i want to store that info in a string. How the hell do i do that?
lagbeast is offline
lagbeast
Junior Member
Join Date: Jul 2007
Old 07-05-2007 , 09:53   Re: sql-problem
Reply With Quote #2

Noone has an idea?
lagbeast is offline
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 21:26.


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