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

Jump to: navigation, search
No edit summary
(removed all content)
 
(9 intermediate revisions by the same user 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=
{{parmdesc|identifier|d1=is used for identifying specific queries that will be handled specially.
|query|d2=is the actual query
|values|d3=array of values...etc. (optional if no values used in the query)
|connection|d4=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: