这是我创建的函数:
function get_phurl_option($option) {
$db_result = mysql_query("SELECT value FROM ".DB_PREFIX."options WHERE option = '$option'") or db_die(__FILE__, __LINE__, mysql_error());
$db_row = mysql_fetch_row($db_result);
return $db_row[0];
}
但是,在访问使用该功能的页面时,我收到以下错误:
File: /usr/home/<removed>/includes/functions.php
Line: 28
Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option = 'shortcode_type'' at line 1
我不确定为什么会这样,我尝试了撇号、语音标记和反引号,但似乎都不起作用。我无法在这里解决问题,因此将不胜感激任何帮助。