The other option is to use bound parameters by passing the second parameter to query(). So you don't even need quoteInto(). Like this:
You can have as many bound parameters as you want, unfortunately you can't use the same one multiple times in the query (unless that's changed since last I looked).Code:... $sql = 'SELECT g.GalleryName, e.EventName ... WHERE g.Type = :gType AND g.GalleryID = :gGalleryId'; $query = $db->query($sql, array( 'gType' => $gType, 'gGalleryId' => $gGalleryId, ));


LinkBack URL
About LinkBacks



Reply With Quote
