PS - Anyone know a good site - "Beginners Guide to MYSQL Queries"
(with plenty of examples...)


Me again....

Ive got (& sucesfully using) :-

$query = "SELECT * FROM table where Fleet LIKE '%$SEARCHTEXT%'";

- this allows me to search where a given field has a particular word /
phrase $SEARCHTEXT

QUESTION...

Ive got one field, where there is a letter/number combination, OR a
letter/number-combination with a dash & 6-digits...

IE :-

YR567
PS234-20040908
UDE428
KII871-20050412
JD67

is there a query string I can use to find all records with the -DDDDDD
/ dash and six digits
(I do not know the digits - I want ANY 6 Digits...) (not 5 digts, or 7 digits)

- Something like preg_match or something ?

Also - The reverse - Find all rows with *NO* dash and 6-digits...

Is this possible in a MYSQL comamnd - Ps, If not, I could just get the
whole lot - & loop through it with preg_match..

Thanks...

PS - Anyone know a good site - "Beginners Guide to MYSQL Queries"
(with plenty of examples...)


-- 

G Stewart
NZ Bus Website 
http://busnz.kwister.com/ - Updated


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to