mysql records
#1

Hi, I have in my database 3 records and I save this into enum > Company[Name]...
And I don't know, how I can show all records, because when I save - cache_get_value_name(0, "Name", Company[Name], 30);
In this enum I have only first record, how I can load all records?
Reply
#2

post the code
Reply
#3

PHP код:
         new query[128];
        
mysql_format(DBquerysizeof(query), "SELECT * FROM `Test`"); 
        
mysql_query(DBquery);        
        
        
cache_get_value_name(0"Name"Company[Name], 30);
        
cache_get_value_name(0"Location"Company[Location], 30);
        
cache_get_value_int(0"Cash"Company[Cash]);
                 
I using this in dialogbecause I wont show all company from database 
It's save only first record from database :/
Reply
#4

PHP код:
new Cache:result mysql_query(DB"SELECT * FROM `Test`");         
         for(new 
icache_num_rows(); != j; ++i)
        {
            
cache_get_value_name(i"Name"Company[Name], 30); 
            
cache_get_value_name(i"Location"Company[Location], 30); 
            
cache_get_value_int(i"Cash"Company[Cash]);
        } 
that should help you.
Reply
#5

Thanks Bro!! <333
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)