in reply to Regex or Index

Actually you can do it in your SQL statement, just add this in your SELECT:
LastName LIKE '[A-K]*' for one case, and LastName LIKE '[L-Z]*' for the other case.

Replies are listed 'Best First'.
Re: Re: Regex or Index
by perleager (Pilgrim) on Nov 26, 2002 at 00:17 UTC
    Hello

    Thanks for reply. I tried using your advice, but no luck. Im sort of a MySQL newbie and confused on how I would put that statement with mine.

    $sql = "SELECT * FROM mailtodo where date = '$INPUT{'date'}' AND lastn +ame LIKE '[A-K]*'";
    The statement above returns no results, but should. I need the where date syntax because I'm also sorting the data by date. Thanks,

    Anthony