开发者

code igniter database (Trying to get property of non-object) on server

开发者 https://www.devze.com 2023-03-08 10:42 出处:网络
On my local machine I access my application using http://localhost/index.php on the server i publish it its

On my local machine I access my application using

http://localhost/index.php

on the server i publish it its

http://myserver:8888/alias/index.php

I've updated this in code igniter config and also replicated my local database on the server. Now something screwy is happening on the server when it reaches

$this->db->query($queryStr)->row()->ID;

I tried to manually run the query inside $queryStr and it gives me back data from the command line however when I ran it like above on the server

$this->db->query($queryStr)->row() returns an empty array

I get

Severity: Notice

Message: Trying to get property of non-object

Filename: models/model_mymodel.php

Am I overlooking someth开发者_开发问答ing why is the exact same code not working on the server?


Check you code to capitalization (case) errors. If your development machine is windows based, it then it does not care about case. You linux server does however.

0

精彩评论

暂无评论...
验证码 换一张
取 消