【问题标题】:PHP SQL Return just returns "Array"PHP SQL Return 只返回“数组”
【发布时间】:2014-03-25 13:21:32
【问题描述】:

我尝试使用类似于以下 PHP 代码的代码从 Firebird 数据库中检索项目。

$sql = "select P_1,P_2,P_3 from p_players('$playerid', '')";
//This sends the SQL select statement to the db
$rs=$db->Execute($sql);
//This converts the SQL statement to an array
$result = $rs->GetArray();
echo $result;

但是,无论我选择什么作为要查询的数据库,我收到的回显结果都会不断返回“Array”。我究竟做错了什么?感谢您的帮助。

【问题讨论】:

  • 将您的 echo 切换为 var_dumpprint_r
  • 感谢工作!谢谢你:)

标签: firebird php4


【解决方案1】:

试试这个:

$sql = "select P_1,P_2,P_3 from p_players('$playerid', '')";
//This sends the SQL select statement to the db
$rs=$db->Execute($sql);
//This converts the SQL statement to an array
$result = $rs->GetArray();
print_r $result;

【讨论】:

    猜你喜欢
    • 2021-05-27
    • 1970-01-01
    • 1970-01-01
    • 2017-01-03
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 1970-01-01
    • 2020-06-28
    相关资源
    最近更新 更多