#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    2
    Rep Power
    0
    I am doing a simple query to an SQL sever with odbc_connect. But it keeps returning the value in the wrong format, i.e. instead of 3994 I get 3,994.00 back. Here is my query:

    $query = "SELECT objectid FROM sysop.ae_dl1 WHERE docid=".$docnumber;
    $result = odbc_do($connection,$query);
    odbc_fetch_row($result);
    $name = odbc_result($result,1);


    //Output Results
    echo "Name: ".$name."<BR>n";

    //Close Connection
    odbc_close($connection);
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Location
    London
    Posts
    110
    Rep Power
    0
    you could just do a ereg_replace on the offending part(s) of the output

    ------------------
    cheers

Similar Threads

  1. Indiscriminate query returns all or nothing.
    By pkluss in forum MySQL Help
    Replies: 5
    Last Post: February 15th, 2004, 07:42 PM
  2. Replies: 2
    Last Post: February 4th, 2004, 07:41 AM
  3. Replies: 3
    Last Post: January 26th, 2004, 04:38 PM
  4. Overwriting mysql query with the query results
    By onerandomday in forum PHP Development
    Replies: 1
    Last Post: January 14th, 2004, 05:45 AM
  5. what's wrong with this query
    By ironchef in forum Database Management
    Replies: 1
    Last Post: January 7th, 2004, 08:53 AM

IMN logo majestic logo threadwatch logo seochat tools logo