Posts tagged: php

Custom string error in CodeIginter where clause

What is the trouble? Base on CodeIgniter Database class user guide, you can pass a custom string directly to the where clause by the $this->db->where() method. Let see the flowing example, suppose that you have successfully initiated your database. … $val = 1; $this->db->where(“id='”.$val.”‘”); $this->db->get(‘mytable’); … You are sure that your table has a field […]

How to use Codeigniter pagination

The pagination and the CodeIgniter framework When you want to present a long list of data, the pagination becomes a useful way to give your users the best interactivity. This makes pagination supported as a class in CodeIgniter framework. Unfortunately, despite of what developers said on the user guide, using this class is not easily […]

Convert date time data between php servers and user browsers

You need this because: Your web server is in a fixed location when your users can be in any country all over the world, Our world doesn’t use the same clock but it’s divided in to 24 parts called timezones You need to get, manipulate or display current date time between your web server and […]