LiveWhale CMS

Welcome, Guest Login

Support Center

Our documentation is moving: docs.livewhale.com

Please check docs.livewhale.com for the most up-to-date LiveWhale CMS and LiveWhale Calendar documentation. The below legacy documentation will remain available as a reference until the documentation migration is complete.

Escaping Values (SQL)

Last Updated: Nov 25, 2015 10:46AM PST

We all know how important is it to protect the integrity of a database by escaping values being utilized in SQL requests. You may also make use of LiveWhale’s built in escape method $_LW->escape() by passing subsequent arguments to applicable methods. The structure is very flexible.

 

// as a single parameter
$_LW->dbo->where('foo=?',$foo); 

// params as an array
$_LW->dbo->where('foo=?',array($foo)); 

//arrays for both
// use an array for multiples
‚Äč$_LW->dbo->where('foo=? AND bar=?', array($foo, $bar));
$_LW->dbo->where(array('foo'=>'?'),array($foo)); 

 

 
eb8f96c071020d8b0923da726d6cab65@livewhale.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete?b_id=4256