Skip to content

Tag: php

Select count(column) from table of mysql in php

I have a database and I am trying to make a website and connect it to my database. I am trying to count the number of instances in a column but I am having trouble. I have this so far: Answer I hope you have the connection done. Here something is column which you are using to filter the output

How to get the SUM of 3 individual columns in codeigniter

I am trying to get the SUM of 3 individual columns. When I try to output I get nothing. What do I do wrong? Model Controller View Answer $this->db->select() accepts an optional second parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names. This is useful if you …

Cron job to update row after 5 days

I’m having difficulty to make a cron job on cpanel to update the state of an user if the account has been created for 5 days. It just doesn’t work at all. When I program the cron job on the cpanel it …