Prepared Statements

From: Date: Tue, 15 Nov 2011 21:23:38 +0000
Subject: Prepared Statements
Groups: php.db 
Request: Send a blank email to php-db+get-48096@lists.php.net to get a copy of this message
Hi all, I am struggerling with a prepared statement (may not even be suited) $stmt = $db->stmt_init();
    if($stmt->prepare("SELECT title,live,where FROM content"))
    {
        $stmt->bind_param('sii',$t,$l,$w);
## This bit here
        $stmt->execute();
        $stmt->bind_result($title, $live, $where);
        while($stmt->fetch())
        {
            echo "$title\t -\t $live\t -\t $where";
        }
        $stmt->close();
    }
How can i get the data i want to select into variables in this scenario (title and Live and where)? BR, Gavin

« previous php.db (#48096) next »