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.

Short Form (simple SQL)

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

There is a shorthand syntax to make quick work of simple queries. With the simple queries, it is assumed you are handling your own escaping of values.

// an example
// SELECT livewhale_news.title FROM livewhale_news WHERE livewhale_news.id = 1;
SELECT $_LW->dbo->query('select', 'livewhale_news.title', 'livewhale_news', array('livewhale_news.id' => 1));  

// a more complex SELECT

// SELECT livewhale_news.id, livewhale_news.title FROM livewhale_news WHERE livewhale_news.id = 1; 
$_LW->dbo->query('select', array('livewhale_news.id', 'livewhale_news.title'), 'livewhale_news', array('livewhale_news.id' => 1));

// an example INSERT

// INSERT INTO livewhale_news (id, …) VALUES(NULL, …);
$_LW->dbo->query('insert', 'livewhale_news', array('id' => NULL, …)); 
 
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