Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Query Parameters
- $params = array( 1, 5 );
- // Get Products
- $query = "SELECT * FROM mydb.Product
- WHERE ProductId >= ?
- AND IsApproved = 1
- AND IsPublic = 1
- LIMIT ?";
- // Get Database Instance
- $dbh = AppApp::getDatabase()->getInstance();
- // Prepare Query
- if( $stmt = $dbh->prepare($query) )
- {
- if( $stmt->execute($params) )
- {
- // Return Records
- }
- }
- object(PDOStatement)[59]
- public 'queryString' => string 'SELECT * FROM mydb.Product
- WHERE ProductId >= ?
- AND IsApproved = 1
- AND IsPublic = 1
- LIMIT ?'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement