21.12.2010, 10:19
Hi, i want to get vehicles i am entering in, ID field in mysql, how should i do that?
mysql_insert_id();
format(Query, sizeof(Query), "SELECT * FROM vehicles WHERE ID= %d", HERE_IS_SOMETHING_I_CANT_GET);
new Query[256];
for(new id; id < MAX_VEHICLES; id++) // Makes an loop so all vehicles get loaded.
{
format(Query, sizeof(Query), "SELECT * FROM vehicles WHERE ID= %d", id);
mysql_query(Query); // Querys the "Query" Variable.
mysql_store_result(); // Stores the result from Query
if(mysql_num_rows()) // Checks if theres anyrow.
if(mysql_fetch_row_format(Query,"|"))
{
sscanf(Query, "p<|>e<ds[25]dffffdddddddddddddddddddds[20]s[20]>",vInfo[id]);