我用过
$member_id = 12;
$results = db_query("select * from {customorders} where id = :fid", array(':fid' => $member_id));
foreach($results as $result) {
$name = $result['name'];
}
但我得到错误Fatal error: Cannot use object of type stdClass as array
那么可能是什么解决方案,如果我为 select 写了错误的查询,请纠正我
我想要“从 id = 12 的 customorders 中选择 *”,而 customorders 是我在 Drupal 数据库中创建的自定义表
请帮我..
谢谢