Raised This Month: $51 Target: $400
 12% 

How to format data enum ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 11-11-2012 , 02:30   How to format data enum ?
Reply With Quote #1

PHP Code:
enum Users
{
   
username[32],
   
password[32]
}

new 
iCount
new g_Users[512][Users]

public 
my_function(Handle:Query){

   while(
SQL_MoreResults(Query)){
      
SQL_ReadResult(Query1g_Users[iCount][username], 31)
      
SQL_ReadResult(Query2g_Users[iCount][password], 31)

      
SQL_NextRow(Query)
      
iCount++
   }   


or:

PHP Code:
   static t_user[32], t_pass[32]

   while(
SQL_MoreResults(Query)){

      
SQL_ReadResult(Query1t_user31)
      
SQL_ReadResult(Query2t_pass31)
      
formatex(g_Users[iCount][username], 31t_user)
      
formatex(g_Users[iCount][password], 31t_pass)

      
SQL_NextRow(Query)
      
iCount++
   } 

Last edited by killergirl; 11-11-2012 at 02:30.
killergirl is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-11-2012 , 16:17   Re: How to format data enum ?
Reply With Quote #2

What's your question or what doesn't work?
__________________
fysiks 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 20:58.


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