Jump to content


Photo

simple... query


  • Please log in to reply
1 reply to this topic

#1 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 17 May 2006 - 03:55 PM

Need to find all records where the third digit is a P

select * from table wherer field like '__P%' --> I thougth mysql used _ for a placeholder, but no returns
If I do like '%P%' I get too many...
??P? is not valid I don't think...

How?


#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 17 May 2006 - 04:18 PM

it should work. maybe there're whitespaces before the string so P is not really the 3rd character?

[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] 'TEsTing' LIKE '__S%'; [!--sql2--][/div][!--sql3--]
returned true for me.
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users