Actions

CodeExample

Difference between revisions of "Debugging a specific query"

From Joomla! Documentation

(Creation)
 
m (Example:debugging a specific query: Taking example from CodeExample:4b40d77049e1f and adding my username at bottom (original meaning of the link that wrongly appeared for tildas))
 
(One intermediate revision by one user not shown)
Line 3: Line 3:
 
//$db = your db object gotten before, with a query loaded (set)
 
//$db = your db object gotten before, with a query loaded (set)
 
var_dump($db->replacePrefix( (string) $db->getQuery()) );//debug
 
var_dump($db->replacePrefix( (string) $db->getQuery()) );//debug
</source><small>You can also try this with some [[How_to_debug_your_code|other debug methods]] in stead because a "var_dump" (bit like echo) will not always display on your screen.<br/>[http://e-motiv.net e-motiv development] 09:39, 11 September 2012 (CDT)</small>
+
</source>You can also try this with some [[How_to_debug_your_code|other debug methods]] instead because a "var_dump" (bit like echo) will not always display on your screen.
 +
[[User:E-builds|E-builds]] 2012-09-11
 
[[Category:JDatabase::debug]][[Category:JDatabase]][[Category:Database]][[Category:CodeExample]] [[Category:MethodExample]]
 
[[Category:JDatabase::debug]][[Category:JDatabase]][[Category:Database]][[Category:CodeExample]] [[Category:MethodExample]]

Latest revision as of 05:21, 12 September 2012

Example:debugging a specific query

//$db = your db object gotten before, with a query loaded (set)
var_dump($db->replacePrefix( (string) $db->getQuery()) );//debug

You can also try this with some other debug methods instead because a "var_dump" (bit like echo) will not always display on your screen.

E-builds 2012-09-11