php - Codeigniter & Datamapper: Retrive all the ID's from ID column and attach to array -


I'm having trouble collecting all the IDs in the column. The code above is only getting an ID, At least this goes on the array but I want to take them all. $ getArticlesId = new Article_model (); $ GetArticlesId-> Select ('id'); $ GetArticlesId-> (Get); $ Anarray = $ getArticlesId-> to_array ('id');

That returns: SELECT article . id FROM ( article )

and array ([ID] => 43), but 10 others

Am I wrong Am doing

to_array () generates an array with your specified fields < Code> all_to_array () generates several arrays with your assigned ID field. $ anarray [0] ['id'] Your first ID should be hopefully you want it.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -