dynamically checking mysql row type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • somaboy mx

    dynamically checking mysql row type

    Is it possible to check the types of columns in a mysql resultset so you
    don't need to know the type of data returned beforehand?

    I'd like to be able to do something like:

    if($coltype == "datetime") {
    // parse date
    }else if ($coltype == "varchar") {
    // parse string
    }

    thx


    ..s


  • Andy Hassall

    #2
    Re: dynamically checking mysql row type

    On Sun, 17 Oct 2004 13:31:20 +0200, "somaboy mx" <none@nosuch.no > wrote:
    [color=blue]
    >Is it possible to check the types of columns in a mysql resultset[/color]

    Get the type of the specified field in a result


    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • somaboy mx

      #3
      Re: dynamically checking mysql row type

      thank you!

      ..s


      Comment

      Working...