dtt27783 2015-04-22 04:58
浏览 18

来自MySQL查询的响应F3框架为空

I'm developing a little web where I use some permissions through a MySql database. This permissions are like this:

read: 1, write: 0, delete: 0

Where 1 is that the user has the permission, and 0 is that the user hasn't it.

Well, the code and query for get this permission are these:

$perms = $bd->exec("select for_read, for_write, for_delete from perms where my_type = :type;", 
            array(
                ':type' => $_SESSION['myuserdata']['type']
            )
        );

This code works fine in my local environment (for development), as with this code I can get the correct permissions; but when i put this code into my production server, the query result is empty (the var_dump always show the fields like ''); weirdest thing is that when I execute the query directly into phpmyadmin, yes I can get the correct permissions.

If I apply a var_dump to the result, the response is like this:

 array(3) { ["writeperm"]=> string(1) "" ["readperm"]=> string(1) "" ["deleteperm"]=> string(1) "" }

This is very strange because the items says string (1), but these don't have value.

Somebody have any idea to solve this issue? Or Why is happening?

Regards from Mexico.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度