-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
smf_db_search_query
Description
Returns the appropriate query for the particular database type
Syntax
bool smf_db_search_query (string $identifier, string $db_string[, array $db_values[, resource $connection]])
Parameter $identifier
Expected type: Enumerated String
Description: A special string that identifies this particular query, and in turn tells the function what to replace in the query
Possible string values Allowed values Description 'create_tmp_log_search_messages' Creating the "log_search_messages" temporary table (replaces "MEDIUMINT" with "int" and strips "TYPE=HEAP") 'create_tmp_log_search_topics' Creating the "log_search_topics" temporary table (replaces "MEDIUMINT" with "int" and strips "TYPE=HEAP") 'drop_tmp_log_search_messages' Dropping the temporary "log_search_messages" table (strips "IF EXISTS") 'drop_tmp_log_search_topics' Dropping the temporary "log_search_topics" table (strips "IF EXISTS") 'insert_into_log_messages_fulltext' Inserting data into the "log_search_messages" table (Replaces "NOT RLIKE" with "!~*" and "RLIKE" with "~*") 'insert_into_log_search_subjects' Inserting data into the "log_search_subjects" table (Replaces "NOT RLIKE" with "!~*" and "RLIKE" with "~*")
Parameter $db_string
Expected type: String
Description: The actual text of the query
Parameter $db_values
Expected type: Array
Description: An array of values to inject into the db_string (see smf_db_query)
Parameter $connection
Expected type: Resource
Description: The name of a specific connection resource to use
Return value
Expected type: Boolean
Description: Returns the $smcFunc['db_query'] statement with the appropriate text (see smf_db_query for more info)
Notes
- Used to replace MySQL-specific keywords with the equivalent syntax for PostgreSQL
- Returns the $smcFunc['db_query'] statement with the appropriate query
- If $identifier is an empty string or isn't in the array, checks for "INSERT IGNORE" and replaces it with "INSERT" if it's there
- Skips errors
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.040 seconds with 13 queries.
- Forum Search