bizar mysql/php problem..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrthumbs
    salad tossing sig guy
    • Apr 2002
    • 11702

    #1

    bizar mysql/php problem..

    Php 4 / mysql 5..

    We had an application running on one machine and moved it to another server.

    Now this problem occurs:
    if, from php, i do a select for the name "john":

    $data = mysql_query("Select * From database WHERE name='john'");

    it works..

    But when i use a NUMBER (lets say john5boy):

    $data = mysql_query("Select * From database WHERE name='john5john'");
    i get 0 results. (and yes the record IS available when i do a select with navicat or browse it with phpmyadmin).

    The record is varchar.. also tried a ".x." etc..

    Above select from navicat or the mysql command line tool DOES work..
    it seems to be something within php..
  • PussyTeenies
    Confirmed User
    • Feb 2005
    • 6496

    #2
    just escape the number
    Need adult hosting?

    Contact us!
    WARM Hosting

    Need an IT solution? or someone to check your site and security? Nossie - IT Professional

    Comment

    Working...