Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select 'Like' ODBC / MS Access / PHP

    I am trying to do a select 'LIKE' statement but I am not returning any results, here is what I am trying:

    PHP Code:
        $get "SELECT item FROM table WHERE item LIKE 'D123-78*'";
        
    $ex odbc_exec($conn$get); 
    But in access there are several items:

    D123-78-567
    D123-78-432
    D123-78-113

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    What is the problem? Unless I'm misunderstanding you, that's how LIKE is supposed to work.

  • #3
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    You might want to try % instead of *.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •