Can't get data from table
#1

I am trying to get data from another table and I did this
PHP код:
    new query[128];
    
format(query,sizeof(query), "SELECT * FROM houses");
    
mysql_query(1query);
    new 
rows cache_affected_rows();
    
printf("%i house(s) loaded"rows); 
And I got
Код:
0 house(s) loaded
Reply
#2

You are only selecting but you do not mention what you are trying to select in your code
Reply
#3

If you want to just count how many rows there are:
pawn Код:
new Cache: result = mysql_query(1, "SELECT COUNT(*) FROM houses");
printf("%i house(s) loaded", cache_get_row_int(0, 0));
cache_delete(result);
Reply
#4

Dark: I want to select all data from the table
Konstantinos: I will try
Edit: Worked Thanks Kon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)