Category: mysql

Shopping Cart using Codeigniter

In this tutorial, we are going to explain how we can use “Cart class in CodeIgniter”. This cart class allows us to add and remove products to a shopping cart and to update them. The Cart Class only provides the core “cart” functionality.  It does not provide other processing components. Steps For Shopping Cart using Codeigniter […]

Ternary operator in Laravel 5

Just today, I was looking at using a ternary operator in Laravel’s Blade templating system. However, instead of writing a ternary statement, Blade provides you with the following convenient short-cut: In this example, if the $string variable exists, its value will be displayed. However, if it does not exist, the word something will be displayed.

count_all_results() Query in Codeigniter

The count_all_results() method is used to get the number of rows in a MySQL result handle. Permits you to determine the number of rows in a particular Active Record query. Queries will accept Query Builder restrictors such as where(), or_where(), like(), or_like(), etc. More Example count_all_results() method also resets any field values that you may […]