1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

PHP odbc_prepare WHERE field IN ($LIST) - (Progress OpenEdge 10.2A)

Discussão em 'StackOverflow' iniciado por fdantas, Julho 13, 2018.

  1. fdantas

    fdantas Administrator Moderador

    I am trying to write a query using the odbc_prepare and odbc_execute statements like so:

    $query = 'SELECT * FROM TABLE WHERE names IN (?) AND age < ?';
    $names = "Joe, John, Billy";
    $age = 21;
    $result = odbc_prepare($this->connection, $query);
    odbc_execute($query, array($names, $age));


    Of course for some reason this isn't working and I have tried several variations on my $names variable formatting. Any help would be appreciated as I haven't been able to find any examples of a query that uses odbc_prepare and a WHERE IN clause.

    I am connecting to a Progress database using an OpenEdge 10.2A odbc driver.

    Continue reading...

Compartilhe esta Página