Chirayu Chirayu - 1 year ago 339
PHP Question

How to get field names of mysql table in codeigniter?

i am new in codeigniter. And i am trying to get field name of a table with a query.

I have write a query

"select * from user"

and pass it to
function. i am getting records. But i want to get field names of table. so how can i get that?

Can anybody help me please. Thanks in advance.

Answer Source

using database library write this code to list all fields:


take a look here:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download