Error database |
Hey everyone,
I'm pass for a strange situation, I'm developing a web system and in my localhost works fine, but I just put the site in the cloud, So I fix the database infos, and all my model class, to first letter UPPER, but when I will login on system, sometimes works fine, but some times get an error, that I will post a image of error and my source code, is that, sometimes works login some times no, I searched a lot and can fix Anyone can help?
@osvaldobnu,
It would be nice to see your model. My first question is what value is expected to be returned by the model? What happens if the result set of the query is empty or null (in the model)?
(02-05-2020, 07:15 AM)php_rocs Wrote: @osvaldobnu, Hey, I upload the model now, And answer your question about what returns, returns null, but the user exist on database. Thanks in advance.
Hi,
Apparently there is no user in your DB. This is the only possible option. To confirm that (if you do not trust your code), take the SQL constructed by CI Query Builder and execute it directly in the DB (using command line mysql, or using PHPMyAdmin or similar tool) to visualize the result: SELECT * FROM usuarios WHERE login=$login AND senha = $senha LIMIT 1 Obvioudly you have to know values for $senha and $login. |
Welcome Guest, Not a member yet? Register Sign In |