working with 'SET'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Klaffenboeck

    working with 'SET'

    Hello!

    I would like to know how I can work with a PHP Array and a set.

    How can i get all rows where a set where at least one item oft the php
    Array is inside the set column?

    Thanks,
    Martin
  • hoonew

    #2
    Re: working with 'SET'

    Look at the php function implode() and the SQL comparison function expr
    IN (...). Probably something like this in php:

    $query="SELECT column FROM table WHERE setcolumn IN
    (".implode(arra y,",").")";

    which seems like a backwards use of SET type, but...maybe I'm not clear
    on what you're trying to do here.

    Martin Klaffenboeck wrote:[color=blue]
    > Hello!
    >
    > I would like to know how I can work with a PHP Array and a set.
    >
    > How can i get all rows where a set where at least one item oft the php
    > Array is inside the set column?
    >
    > Thanks,
    > Martin[/color]

    Comment

    Working...