Main Menu

Bug?

Started by kilbluff1985, December 12, 2012, 11:29:20 PM

Previous topic - Next topic

kilbluff1985

Hey guys when ever i do a player search using O'Brien it comes up with this

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Brien') as relevance from players where match (fullname) against ('O'Brien') hav' at line 1

just wondering if it's a bug or if it's normal

monstrum

Probly a html code thing  :-\

Just search for first name ;)

Capper

#2
SQL doesnt like single quotes sometimes

Try typing the whole name eg Harry O'Brien

kilbluff1985

but that's so much harder then just copy and pasting the surname lol

FML ::)

Mr.Craig

Quote from: kilbluff1985 on December 13, 2012, 12:31:03 AM
but that's so much harder then just copy and pasting the surname lol

FML ::)

Just type in Harry, comes straight up. ;)

The troubling question is why in the world are you searching for him?? ??? :P

kilbluff1985

Lol well i never said i was searching for Harry only said O'Brien and that was to find out if the one i was looking at is on the rookie or senior list for the new thread i did in BXV

Mr.Craig

Yeah after I wrote that I thought "Shower, what if there's another O'Brien?" lol.

Anyway, the advice still holds. Just try the first name and see how it goes. :)

R.Griffen

Quote from: Mr.Craig on December 13, 2012, 01:25:11 AM
Yeah after I wrote that I thought "Shower, what if there's another O'Brien?" lol.

Anyway, the advice still holds. Just try the first name and see how it goes. :)

+1

Jesse O'Brien, that's my lad the best O'Brien out!!!

nas


valkorum

The issue will be the single quote.  Single quote is used to denote variables

ie

select * from table
where name = 'name'

substituting O'Brien in there causes an error because it cant understand brien'

select * from table
where name = 'O'Brien'

kilbluff1985

if i just search for Brien no players come up

valkorum

Quote from: kilbluff1985 on December 13, 2012, 12:04:56 PM
if i just search for Brien no players come up

Thats because its now searching for this

select * from table
where name = 'brien'

There are no players with a surname of brien

Just out of curiosity try searching for this %brien

kilbluff1985

nope no players either

valkorum

Interesting.  % is the wildcard search in SQL.  I would need to see the SQL code, which I highly doubt m0nty will let me see before I can further help.  Sorry I cant help you any further KB.

I was able to search harry to find the listing of Harry O'Brien and searching "Harry O" took me staight to him

kilbluff1985

yeah i understand but the list i was going off in BXV had the first name as an initial then the surname like J O'Brien so it's a pain to have to find out there first names first

i made the thread to see if mOnty is aware of it