LiveWhale CMS

Welcome, Guest Login

Support Center

Our documentation is moving:

Please check 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 = 1;
SELECT $_LW->dbo->query('select', 'livewhale_news.title', 'livewhale_news', array('' => 1));  

// a more complex SELECT

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

// an example INSERT

// INSERT INTO livewhale_news (id, …) VALUES(NULL, …);
$_LW->dbo->query('insert', 'livewhale_news', array('id' => NULL, …));
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found