Skip to content

Tag: mysql

How to ‘really’ detect integers from DB?

I’m trying to save some code with the following. I’ve an object with variables named the same as table rows so I could create an insert like this one: $query = “INSERT INTO table “; $columns =…

Purpose of Secondary Key

What is the purpose of the Secondary key? Say I have a table that logs down all the check-ins (similar to Foursquare), with columns id, user_id, location_id, post, time, and there can be millions of rows, many people have stated to use secondary keys to speed up the process. Why does this work? And should bot…

Excel output with codeigniter

I’m trying to get a report from my codeigniter project in excel, but I am at a complete loss on how to do it. It already works well, just would like the output in excel rather then a page. Any tips/pointers/explanations? thanks! Answer I’ll refer you to this wiki article from the codeIgniter site,…