typo3 extension: what is the difference between exec_SELECTquery and SELECTquery? -


i saw below codes in 1 extension file:

$res = $globals['typo3_db']->exec_selectquery(                     'fu.uid, fu.tstamp, fu.username, fu.usergroup, fu.email, fu.tx_jcregister_first_name, fu.tx_jcregister_last_name',                     'fe_users fu'.$from,                     $where,                     '',                     $markerarray['###sort###'].' '.$markerarray['###order###'],                     $limit                 ); 

when checked file: class.t3lib_db.php, saw function/method:

function selectquery($select_fields, $from_table, $where_clause, $groupby = '', $orderby = '', $limit = '') 

so question is:

what difference between exec_selectquery , selectquery? , when use exec_selectquery? when use selectquery?

there more database operations put in single methods in class, update, delete , on. come paired, 1 exec_ prefix. if read documentation (which not, obviously), explained there every method.

the methods without exec_ prefix return string, namely query built. exec_xyz return query result because query has not been built, exec uted, name implies.

function exec_selectquery($select_fields, $from_table, $where_clause, $groupby = '', $orderby = '', $limit = '') {     $query = $this->selectquery($select_fields, $from_table, $where_clause, $groupby, $orderby, $limit);     $res = mysql_query($query, $this->link);     if ($this->debugoutput) {         $this->debug('exec_selectquery');     }     if ($this->explainoutput) {         $this->explain($query, $from_table, $this->sql_num_rows($res));     }     return $res; } 

if ignore 2 ifs moment, method nothing more "wrapping" query building execution of it. 2 conditions debugging.

btw: encourage more research on own, google it, have in documentation or little deeper in code. if not understand small piece of code question about, doubt makes sense investigate typo3 extension on level detail latest questions imply (no offense).


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

android - Inheriting from Theme.AppCompat* -