Thursday, April 19, 2012

Object-Oriented Programming meets PHP with examples

Posted by on Thursday, April 19, 2012
After getting request for the above topic, we decided to write a tutorial on it. However, if you need more detailed lessons you can check out www.computerclasses.org for available courses on this topic.

As we all know that object-oriented programming is an approach in which objects and classes are used and this approach is being followed by the some of the leading programming language like C++ and Java. Click here, to read about OOPs Concept in Java.

Before the introduction of PHP 4 OOP in PHP was not at all possible but after its introduction in PHP 4 and more advancement in PHP 5, the users are making full use of it and other programmer who thought PHP to be difficult are now actually enjoying it.


Wednesday, April 18, 2012

Import a CSV file to MySQL via phpMyAdmin

Posted by on Wednesday, April 18, 2012
After getting requests for this tutorial from our readers on this topic, we decided to do a post on it.

If you also want to request a tutorial then feel free to use the "Request a Tutorial Here" link and send us a request for FREE.

According to the request the task was to import a CSV file to MySQL DB. 

Saturday, April 14, 2012

Querying Data using the PreparedStatement Object

Posted by on Saturday, April 14, 2012
Consider a scenario where a New Publishers, a pubhlishing company maintains information about the books and the authors in a database. The company wants an application using which they cab access the information about authors based on different criteria. For Example, it should retain all authors living in a city specified at runtime. In this scenario, we cannot use Statement object to retrieve information because the value needs to be specified at the runtime. We need to use the PreparedStatement object as it can accept runtime parameters.

The PreparedStatement interface is derived from Statement interface and  is available in the java.sql package. 

The PreparedStatement objects are compiled and prepared only once by JDBC.

Using HighCharts with php , MySQL and CodeIgniter

Posted by on Saturday, April 14, 2012
Highcharts is a charting library which helps to display interactive Javascript charts on webpages. But our tutorial is how to make use of Highcharts with php, MySQL and CodeIgniter. 

While working on a project I found out that HighCharts is the best to display graphs on webpage as it has less overhead and requires less space. But the biggest challenge was to implement it using php  and not jQuery. We will implement it using MVC pattern as CodeIgniter follows the same.

Here is how we will be going about leaning this :

1. We will need HighCharts Library for CodeIgniter and HighChart config file. That we have defined below. (library is pretty long)
2. We will be making Models, Controllers and Views to display the Chart taking the values from MySQL. (if you want to check controllrt, model and view then directly go to the end)

© 2010 Code 2 Learn