When I have this query:
Code: Select all
$reporter_id_array = array(1,2,3);
$query = "select id from mantis_bug_table where repoerter_id in " . db_param();
$result = db_query_bound($query, array($reporter_id_array));
Thanks,
Jingshao
Moderators: Developer, Contributor
Code: Select all
$reporter_id_array = array(1,2,3);
$query = "select id from mantis_bug_table where repoerter_id in " . db_param();
$result = db_query_bound($query, array($reporter_id_array));
I thought it is the other way around. Can you point me to the document?db_query_bound is deprecated, you should use db_query
Code: Select all
db_query_bound()
Code: Select all
db_param()
Code: Select all
$reporter_id_array = array(1,2,3);
$query = "select id from mantis_bug_table where repoerter_id in " . db_param();
$result = db_query($query, array($reporter_id_array));
Code: Select all
$reporter_id_array = array(1,2,3);
$db_param_list = array(db_param(), db_param(), db_param());
$db_param_str = "(" . implode(",", $db_param_list) . ")";
$query = "select id from mantis_bug_table where repoerter_id in " . $db_param_str ;
$result = db_query_bound($query, $reporter_id_array);
Code: Select all
$query = new DbQuery('select id from {bug} where id in :id_list');
$query->bind('id_list', array(123,234,345));