views:

8

answers:

1

Greetings, I am developing an Admin Control panel and I have to use ODBC to connect to the Database. I'm used to using MySQLi so this is extremely awkward for me. I'm trying to make this as OOP as possible, so I'm using classes and prepared statements.

I need to know if there is an ODBC alternative to bind_param and how to use it? I'm used to using the following for MySQLi

  if($stmt = $this->conn->prepare($query)) {
    $stmt->bind_param('ss', $userid, $pass);
    $stmt->execute();

    if($stmt->fetch()) {
        $stmt->close();
        return true;
    }
}

But I don't have a clue what the ODBC alternative would be... Thanks in advance.

My query in case you was wondering is

SELECT * FROM Login WHERE UserID = ? AND Password = ?

Thanks.

A: 

Do use PDO with ODBC driver

Dave