Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-27-2012, 03:13 AM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 43,509
fadillzzz is an unknown quantity at this point
Default

Assuming you have a unique index on the name field, this can be achieved without any additional query.

PHP Code:
$stmt $adopts->query('...');
if ( ! 
$stmt)
{
    
// failed, the name is already in use
}
else
{
    
// successfully renamed

I think this would be a much better solution, because not only that you keep the MySQL from choking, but you also keep your code succinct.

Last edited by fadillzzz; 03-27-2012 at 03:15 AM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.4 Know Gender of New Pets Before Naming Kyttias Mys v1.3.x Mods 4 08-04-2018 01:13 AM
Show Gender while Naming Pet & Name Promo Code Pets Kyttias Questions and Supports 5 07-11-2014 02:12 PM
Naming and Changing Help whispwill Suggestions and Feature Requests 10 08-29-2009 02:58 PM


All times are GMT -5. The time now is 02:11 PM.

Currently Active Users: 2984 (0 members and 2984 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636