help needed with zen fixes...
Hi i am posting the code that deletes, checks if invalid or adds your ip @ zentracker...i noticed that there is no check if the current ip is in use already and gines a message that Your current ip is already in use and redirects to /membres/options as the other checks do, so when trying to add the ip and the system already has it added you get an integrity sql error...can anyone help me add this check?Thanks in advance...
Code:
/** |
I think it would be better to write own DQL (or raw SQL query if you know...) with part ON DUPLICATE KEY update... Something like http://stackoverflow.com/a/24384768 And you can save on SQL query :)
Bump: I understand the problem now... You can write small query for check if given IP and user exist in database, because there is unique key... PHP Code:
|
3 Attachment(s)
thanx...i will try it and post the results
Bump: if the ip is not in use it still says ip already in use! I added pictures....As you can see in second picture the message and in third picture no ip added! How can i send you result of var_dump($exists); in both cases? Bump: :muscle: |
All times are GMT +2. The time now is 17:23. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.