User:Emanuele/smctemplate test: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
(removed all content)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{:User:Emanuele/smctemplate
 
|function=db_query
|usage=$smcFunc['db_query'] (identifier, query, values, connection)
|description=Works Similar to how db_query worked in 1.x versions
|parameters=
*'''identifier''' - is used for identifying specific queries that will be handled specially.
*'''query''' - is the actual query
*'''values''' - array of values...etc. (optional if no values used in the query)
*'''connection''' - database connection (optional)
|example=             $result = $smcFunc['db_query'](''', '
                SELECT poster_time
                FROM {db_prefix}messages
                WHERE id_msg = {int:id_msg}
                LIMIT 1',
                array(
                    'id_msg' => $user_settings['id_msg_last_visit'],
                )
            );
|return=a query resource or '''false''' on error.
}}

Latest revision as of 18:48, 25 May 2011



Advertisement: