Raised This Month: $ Target: $400
 0% 

Wrong data loading from SQL


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 07-15-2010 , 16:12   Re: Wrong data loading from SQL
Reply With Quote #2

1. You should have posted table structure...
2. Use "... where nickname='%s';"
3. Try this (don't forget to replace column_name with name of id column in your table):
PHP Code:
    if(SQL_MoreResults(Query)){
        
Aid SQL_ReadResult(QuerySQL_FieldNameToNum(Query,"column_name"))  //replace column_name with id column name !
        
log_to_file("testing.log""Nactena data: %d; Time = %d"AidTime)
    }else{
        
log_to_file("testing.log""No data found")
    } 
4. If you used "select * from ..." then print all retrieved data, it makes things easier when debugging.
PHP Code:
    if(SQL_MoreResults(Query)){
        
//...
        
iValue1 SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"iColumn1"))
        new 
szValue2[32]
        
SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"szColumn2"), szValue231)
        
//...
        
log_to_file("testing.log""iValue1: %d, szValue2: %s ...."iValue1szValue2, ...)
    }else{
        
log_to_file("testing.log""No data found")
    } 
__________________
Impossible is Nothing
Sylwester is offline
 



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 07:09.


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