![]() |
Home Community Mys-Script Creative Off-Topic |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
![]()
If someone has the name Holly for an adopt, how can I make it so that another person can use HoLLy, or some other variation of the same name?
|
#2
|
||||
|
||||
![]()
Not that I can answer this...but are users currently unable to give their pet the same name of another existing pet..?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#3
|
||||
|
||||
![]()
If you have it set up that way which I do. And I think that it's default.
|
#4
|
||||
|
||||
![]()
You can use strcmp() function to validate the name of an adoptable with another. This one is case sensitive, so Adopt and adopt are not the same.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
![]()
Where do I place that at?
|
#6
|
||||
|
||||
![]()
Place it where it validates adoptables name.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#7
|
||||
|
||||
![]()
I tried this but I don't think it's correct as it didn't work.
Code:
else{ $stmt = $adopts->query("SELECT * FROM ".constant('PREFIX')."owned_adoptables WHERE name='{$more}'"); $row = $stmt->fetchObject(); if(!is_object(strcmp($row))){ // The name has not yet been used, we are good to go! |
#8
|
||||
|
||||
![]()
Of course its not correct lol. You dont know how to use the strcmp() function dont ya? It accepts two arguments, not one. The arguments have to be strings, not objects. Try this:
PHP Code:
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#9
|
||||
|
||||
![]()
Rawr, I'm not putting it in the right place :(
Code:
$name = $adopts->query("SELECT name FROM ".constant('PREFIX')."owned_adoptables WHERE name='{$more}'")->fetchColumn(); if(!strcmp($name, $more)){ // The name has not yet been used, we are good to go! $adopts->query("UPDATE ".constant('PREFIX')."owned_adoptables SET name='{$more}' WHERE aid='{$id}' and owner='{$loggedinname}'"); Last edited by SilverDragonTears; 12-30-2012 at 11:31 AM. |
#10
|
||||
|
||||
![]()
umm are you sure the query is executed correctly? I mean, do the variables $id and $more exist? If so, what values do they hold? Use var_dump($id) and var_dump($more) to validate their values. If one of them turns out to be blank or null, you know the problem.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Domain Names | Abronsyth | Webmasters Area | 4 | 11-28-2015 04:55 PM |
Names for adoptables? | tahbikat | Adoptables Buzz | 1 | 06-22-2014 12:26 PM |
Species Names | Beaux | Questions and Supports | 5 | 05-09-2011 04:07 PM |
Descriptions and Names for each level? | milay | Suggestions and Feature Requests | 1 | 03-06-2009 06:26 AM |
Help With Changing Names? | rosepose | Questions and Supports | 2 | 02-07-2009 03:47 PM |
What's New? |
What's Hot? |
What's Popular? |