ottworks / maestro

a competent admin mod for garry's mod
http://ottworks.github.io/maestro
24 stars 7 forks source link

Don't use the wrapper #66

Closed TNovalis closed 8 years ago

TNovalis commented 8 years ago

The wrapper is bad..

[mysql] MySQL Query Error!
Query: INSERT INTO `maestro_ranks` (`rank`, `inherits`, `cantarget`, `canrank`, `color`) VALUES ("admin", "user", "<^", "!>^", "255 255 255")
Duplicate entry 'admin' for key 'PRIMARY'
[mysql] MySQL Query Error!
Query: INSERT INTO `maestro_ranks` (`rank`, `inherits`, `cantarget`, `canrank`, `color`) VALUES ("superadmin", "admin", "<^", "!>^", "255 255 255")
Duplicate entry 'superadmin' for key 'PRIMARY'
[mysql] MySQL Query Error!
Query: INSERT INTO `maestro_ranks` (`rank`, `inherits`, `cantarget`, `canrank`, `color`) VALUES ("user", "user", "<^", "!>^", "255 255 255")
Duplicate entry 'user' for key 'PRIMARY'

..because it doesn't support the ON DUPLICATE KEY.

Just rewrite your mysql and only have it be mysqloo (the most commonly used).

Also use conditional logic to know if you run the query or not... I swear.

andreblue commented 8 years ago

mysqloo sucks........ tmysql is much better and does not have memory leaks

ottworks commented 8 years ago

That error was harmless (and actually intended behavior). CAMI was adding ranks before I had loaded mine--I've fixed it in 2.0.3