Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Bugs

Archive::Bugs Archive area for Bugs's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #16  
Old 08-23-2004, 10:44 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

ya ` works but not '
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote
  #17  
Old 08-23-2004, 04:02 PM
animepimp
Dragon
 
Join Date: Jan 2004
Posts: 860
Default

I believe that %' is an escape character in SQL that says to the DB to process it as a ' instead of the end of a string since thats what 's are usually used for. The ' was saying the string was over and the DB couldn't match the normal ' at the end to anything so it failed. You can also do the same thign for a few other special characters, like %% inserts a %. And I could be completely wrong of course, but I do beleive from my SQL class two years ago that is the right way to do it.
Reply With Quote
  #18  
Old 08-23-2004, 04:22 PM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

i used % in mysql as a wildcard character.

Code:
SELECT ALL FROM npc_types WHERE name LIKE '%goblin%';
selects all things containing goblin in the name.. Dunno if this is at all related.. but .. ya there ya have it )

So if as you said %' was an escape... the above wouldn't in theory work.
Reply With Quote
  #19  
Old 08-23-2004, 04:46 PM
animepimp
Dragon
 
Join Date: Jan 2004
Posts: 860
Default

Yeah, my memory was faulty, big suprise. I now remember (with google's help) that SQL uses the standard backslash as the escape character. So you can do \' or whatever to make SQL ignore it and put it into the DB as a quote. This will probably display weirdly when you first spawn the npc, it might show their name as "Bob\'s Cow" until you shut down the zone and restart it because the code will see the \ until it writes to the DB and reads it back, but it should work once the NPC is loaded fromt he DB.

PS I think i remember now that the %% thing came C in printf and scanf methods. Sorry for my brain farts.
Reply With Quote
Reply


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

   

All times are GMT -4. The time now is 01:00 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3