Curses... Unique naming
When a user names their pet and the name is already taken, how can I show that? I have it set where names are unique.
Code:
// We are renaming an adoptable |
Well it isnt really difficult, just find this part in your script:
PHP Code:
PHP Code:
|
Assuming you have a unique index on the name field, this can be achieved without any additional query.
PHP Code:
|
Good idea Fadillzzz, $stmt should return false if the query fails. This should significantly reduce the memory consumption for cases that the script merely checks if a row exists. Also it is better just to select the field name from the database instead of using '*', I just showed her an example of how to do this kind of trick though.
|
Hof yours didn't work :/
|
Pardon me for being ignorant... where do I put this and what do I put in the ('...')
Quote:
|
Oh my I must suffered from a lack of sleep then, lol. Remove this part from the very first line and it should work:
PHP Code:
|
What would I do without you Hof?
|
lol you flattered me. And I apologize for giving you the wrong codes in the first place. XD
|
All times are GMT -5. The time now is 09:26 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.