-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined parameters when sending nil values from Lua #30
Comments
Seems like the parser sees a null parameter as undefined and throws the error above. SET sql_mode=EMPTY_STRING_IS_NULL; |
First, no. When using the Dunak has expressed intent to allow passing This is because using |
I tested sending nil values through |
I am also having an issue similar to this, not sure if I should open a new issue or just post in this one. getting reports in the fxserver log like this: [ script:oxmysql] Error: Undefined parameter cid there is a lot of cases where i use a parameter as cid as its the character identifier, but it doesn't state where the error comes from, if possible it would be nice if it could at least say where it's coming from so I can fix it. cheers. |
Use latest version and you will see error |
These errors started on latest 1.4.1 , had never seen them before then. I'm already on latest version. |
Like stated before, a fix/change to this is being worked on. |
my bad I misunderstood what he said, thought he was implying to use latest to see where the error was coming from. i understand now |
I have this mostly working at the moment for named and unnamed parameters. |
Only situation that fails is when sending only nil named parameters |
Fixed in #51. |
when a variable in LIA has value of nil the sql query throws an error
In this example garage is nil It comes from the DB select as NULL in the table which is the default value
But when it is inserted back it seems to ignore it and causes the undefined object.
[ script:oxmysql] [ERROR] qb-garages was unable to execute a query!
[ script:oxmysql] Undefined object parameter #2
[ script:oxmysql] UPDATE player_vehicles SET state = ?, garage = ?, depotprice = ? WHERE plate = ? {"1":0,"3":0,"4":"3TL036RH"}
Is there a way to have it recognize nil value and insert them as NULL?
The text was updated successfully, but these errors were encountered: