doushu5451 2019-07-13 03:48
浏览 51

在PHP中打印多个sql语句

I have this statement that works and doesn't need to be changed:

$stid = oci_parse($conn, "select username from users where username = '$user' and user_type != 'manager'");
oci_execute($stid);

if (($user = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) == false){
    echo "ONE";
}else{
    echo "TWO";
}

How can I create another statement, for example assign another statement at variable, and place is in the main statement (for example in place of echo "ONE")?

I tried to create a variable:

$query = "select PLACE from CITY";

and I just echo "$query"; it display the text of query between "", but not checking in Oracle

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
    • ¥15 安装svn网络有问题怎么办
    • ¥15 vue2登录调用后端接口如何实现