Columns of sql server tables are not recognized in php

Asked

Viewed 51 times

0

I have columns that were saved in sql server with uppercase letter, when I receive in php I needed him to recognize them both minuscules and uppercase.

For example:

select * from rzv_aluno

records:

AL_NOME, AL_EMPRESA... etc

in php I can only see the records if I point

$r->AL_NOME

I wish there was no difference between

$r->AL_NOME e $r->al_nome
  • Check the collation of the database, you are probably using a case-sensitive collation. You have to switch to a case-insensitive collation to use the way you want, I just can’t tell you how to change in sql server.

  • In PHP the variable name is case-sensitive, but the function name is not.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.