Not creating the vehicle mysql
#1

I am creating the script to create vehicle mysql, and create one command, with the next code mysql (All variables has been definided):
PHP код:
    new Query[500];
    
format(Querysizeof(Query),"INSERT INTO `vehiculos` (`PosX`, `PosY`, `PosZ`) VALUES ('%f', '%f', '%f')"X2Y2Z2);
    
mysql_tquery(ConecctionQuery,  "CrearVehiculoConceMysql""ddd"playeriddealerid2); 
The problem is: Not create the vehicle.
The callback "CrearVehiculoConceMysql" is the next:
PHP код:
forward CrearVehiculoConceMysql(playeriddealeridVehConceID); 
In the callback, asign the vehicle variable, and save with mysql:
PHP код:
public CrearVehiculoConceMysql(playeriddealeridVehConceID)
{
new 
id = -1;
VehicleIDMYSQL[id] = cache_insert_id();
id VehicleIDMYSQL[id];
// ETC etc
return 1;

Yes asigned all variables [In the old time, i am creating the code, in other method, and no problem], but now fails to save variables.
Reply
#2

You have to create tables on ''vehiculos''
For example if in your script is MAX_VEHICLES 100 you need to create 100 tables
Reply
#3

Quote:
Originally Posted by extender1987
Посмотреть сообщение
You have to create tables on ''vehiculos''
For example if in your script is MAX_VEHICLES 100 you need to create 100 tables
Not is MAX_VEHICLES, and not create 100 tables ._. , i am create the tables with the script, not manually.
Reply
#4

mysql is not working like io_read files .txt ...
you have to create like this INSERT INTO `vehiculos` (`PosX`, `PosY`, `PosZ`
INSERT INTO `vehiculos` (`PosX`, `PosY`, `PosZ`
INSERT INTO `vehiculos` (`PosX`, `PosY`, `PosZ`etc etc in your phpmyadmin SQL
Reply
#5

Quote:
Originally Posted by extender1987
Посмотреть сообщение
You have to create tables on ''vehiculos''
For example if in your script is MAX_VEHICLES 100 you need to create 100 tables
Are you even serious? No, you don't.

@OP: write code in English if you expect any useful help. It's hard to understand code without context. I can only tell you that this is wrong:
PHP код:
new id = -1;
VehicleIDMYSQL[id] = cache_insert_id();
id VehicleIDMYSQL[id]; 
What you're writing is effectively this:
PHP код:
VehicleIDMYSQL[-1] = cache_insert_id(); 
Which is wrong and will give a runtime error. I don't understand the context so I cannot (won't) give any additional information.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)