[SQL] result help
I have a problem with my script.
This script put mapnames in my Mysql-Database. The Problem is, comes the map again, the script write the map in the Database again -.- PHP Code:
|
Re: [SQL] result help
formatex( query, 1023, "create table if not exists map_names (map varchar(32))", mapname)
Remove this : , mapname |
Re: [SQL] result help
formatex( query, 33, "INSERT IGNORE INTO `map_names` VALUES ('%s')", mapname )
or formatex( query, 33, "INSERT IGNORE INTO `map_names` SET map = '%s'", mapname ) while if u only insert each map, the maps are double counted in the database. with ignore it will be skipped. there are just other methods they may useful if u want to catch more things as the mapnames, so u can use replace into. |
Re: [SQL] result help
dont work ):
with this code the script write 1 map in database, if mapchange, no more map added PHP Code:
PHP Code:
Quote:
|
Re: [SQL] result help
sorry, try this:
formatex( query, 33, "INSERT INTO `map_names` (`map`) VALUES ('%s') ON DUPLICATE KEY UPDATE map=map", mapname ) |
Re: [SQL] result help
don't work too. self problem... any ideas? -.-
|
| All times are GMT -4. The time now is 21:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.