nguyenbason Posted May 15, 2009 Share Posted May 15, 2009 Hello all,Before posting this topic, I searched forum and google. I found some topic about this thing, like: http://www.autoitscript.com/forum/index.php?showtopic=51952But all post are showing me the return of array:eg: $iRval = _SQL_QuerySingleRow(-1,"SELECT * FROM member;",$aRow)i just want to get value of a exactly comlumn. Example:Select name from customer where phone=123456orDelete from items where name='abc' and phone='123456'....Have you any for this?Thanks in advance, UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
Zedna Posted May 15, 2009 Share Posted May 15, 2009 Search forum for "ADODB.Recordset" to see examples how to do it. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ChrisL Posted May 15, 2009 Share Posted May 15, 2009 (edited) If your using my UDF that you linked to above, then just use Local $aRow _SQL_QuerySingleRow(-1,"Select name from customer where phone='123456'",$aRow) If $iRval = $SQL_OK then Msgbox(0,"",$aRow[0]) The single value returned will be in $aRow[0] For your other one use _SQL_Execute(-1,"Delete from items where name='abc' and phone='123456'") Edited May 15, 2009 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
nguyenbason Posted May 16, 2009 Author Share Posted May 16, 2009 If your using my UDF that you linked to above, then just use Local $aRow _SQL_QuerySingleRow(-1,"Select name from customer where phone='123456'",$aRow) If $iRval = $SQL_OK then Msgbox(0,"",$aRow[0]) The single value returned will be in $aRow[0] For your other one use _SQL_Execute(-1,"Delete from items where name='abc' and phone='123456'")Very usefull. Working perfectly. Thanks much ChrisL!!! UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now