Raised This Month: $ Target: $400
 0% 

Mysql query and text in db


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
asdcoolpix
Junior Member
Join Date: Aug 2008
Old 04-10-2009 , 10:21   Mysql query and text in db
Reply With Quote #1

All greetings. For me a small problem. To a database to be stored in a cell the number. By operation of the given code all passes as it is necessary. The result is displayed in the server console. I wish to output the text from a cell and to display it in the console. At inquiry there is unit or a zero, and it would be necessary that value of a cell was displayed.

PHP Code:
public xxx(){

    new  
error[256]
    new 
ErrorCode
    g_SqlTuple 
SQL_MakeDbTuple(H_HOST,H_USER,H_PASS,H_DB)
    
SqlConnection SQL_Connect(g_SqlTuple,ErrorCode,error,255)
    
    new 
Handle:Query SQL_PrepareQuery(SqlConnection"SELECT value FROM hmk_update WHERE type='huds'")
    
    if(!
SQL_Execute(Query))
    {
        
SQL_QueryError(Query,error,255)
        
server_print("[HOMKA QDB] Error: %s^n",error);
    }
    
server_print("[HOMKA QDB] NOT Error");
    new 
Data
    Data 
SQL_ReadResult(Query,0)
    
server_print("[HOMKA QDB] result: vakue  huds - %d",Data)


[IMG]http://img237.**************/img237/6158/fucktesttable.jpg[/IMG]
[IMG]http://img237.**************/img237/fucktesttable.jpg/1/w1680.png[/IMG]

Last edited by asdcoolpix; 04-10-2009 at 10:44.
asdcoolpix is offline
Send a message via ICQ to asdcoolpix Send a message via Skype™ to asdcoolpix
 


Thread Tools
Display Modes

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 02:21.


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