News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Using the ADOdb library with Oracle and PHP
October 24, 2008 @ 09:35:14

On the PHPBuilder.com site today there's a new tutorial continuing in their Oracle theme about using the ADOdb libraries to access the database from your application.

Last week we discussed the use of the OCI8 extension and connection methods for using ADOdb to connect to an Oracle database. This week we'll delve further into the ADOdb library and will disect some example code to get you up to speed!

He gives an overview of some of the functions needed to make the connection and fetch results from a simple query. Some sample code and explanation is also included.

0 comments voice your opinion now!
adodb library database oracle tutorial example


PHPEverywhere:
Octalpussy
February 04, 2008 @ 10:25:00

In an earlier post John Lim pointed out an interesting issue with how certain numbers are handled in PHP - ones starting with a zero:

That's because any number preceded by 0 is treated as an octal number, and 9 is an invalid octal number. [...] The silly thing is that hardly anyone uses octal nowadays, but it continues to be part of the C, C++, Java and PHP standards. The mistake is also very common.

There's not much way around it, he notes - the format's been in use for a long time now and is so ingrained in just about every C-based language out there that it's "too deeply imprinted in modern compiler DNA" to take out.

0 comments voice your opinion now!
octal number bug base8 adodb


PHPEverywhere:
Octopussy numbers in PHP
February 01, 2008 @ 09:21:00

John Lim has posted about an interesting bug he's come across when working with the output of two strings that should look the same:

Someone reported a bug in ADOdb, the open source db library i maintain. I went crazy for half an hour until i realised the problem.

According to him, "if you expect the above code to produce the same values, you are sadly mistaken". His example gives an interesting result for the first echo statement - not echoing the 9 in the first character like it seems would make sense. Check out his post for the code and try it out for yourself.

0 comments voice your opinion now!
number echo adodb database gotcha


Floss Valley Blog:
Developing AJAX Application using Smarty and Xajax
December 11, 2007 @ 07:59:00

On the Floss Valley blog, there's a tutorial posted on creating a sample PHP-driven, Ajax-enabled website using the Smarty templating system and the Xajax library.

This tutorial will explain how to develop a simple AJAX application using Smarty and Xajax with a simple example. The sample application is developed in a Fedora 7 + Apache-2.2 + MySQL-5 server.

They require you to already have some software installed (like PHP, MySQL, ADOdb, Xajax and Smarty) before you get started - no installation guides for those though. They do, however show how to:

  • Create the database structure
  • Lay out the source code files
  • Make the configuration
  • Connection to the database and to the Ajax script
3 comments voice your opinion now!
ajax website smarty template xajax mysql adodb apache ajax website smarty template xajax mysql adodb apache


Hasin Hayder's Blog:
Prelude to foundation Its time to go for a better PHP Framework
April 23, 2007 @ 15:54:07

In a new blog entry today, Hasin Hayder tells the reader a "little story" about a journey he made to get to framework happiness with CodeIgniter.

He walks through his thoughts and needs at different stages of the development process - a database abstraction library here, version control there - and ending up with the framework choice that faced him. Among his options were offerings by Prado, Seagull, Symfony, CakePHP and his pick - CodeIgniter.

Suddenly I got codeigniter and I was able to run a whole lot of controllers, templates and models in minutes (well not in minutes, but much less time than previous ones). A rich , pleasing to read, friendly set of documentation, a bunch of in built libraries and less autonomous control gives me full freedom over my application. It was easy to integrate my old friend smarty with it, in case it comes with it's own active record, but it gives me chance to add adoDB with it. I fall in love with code igniter soon after i realize that it comes with almost zero learning time (or i better say learning on demand)

He also mentions that, had the post been a bit more technical in nature, other factors would have been included. As it is, though, it flows a bit better this way.

0 comments voice your opinion now!
framework codeigniterframework story smarty adodb mysql framework codeigniterframework story smarty adodb mysql


PHPEverywhere:
My experience moving to PHP5
December 04, 2006 @ 08:22:00

In his new post on PHPEverywhere today, John Lim shares some of the experiences he's had so far in making the move up from PHP 4 to PHP 5 in his applications.

The transition was relatively painless. [...] What's nice about PHP5 is that it caught some errors that have been lingering in our code: PHP5 no longer allows a function to be defined twice, and some basic variable referencing errors that we missed previously.

They made the move to PHP5 for the latest versions of their applications, but have still stuck with the legacy, PHP4 versions for the time being to give customers a buffer period to make the move themselves. He also mentions changes to the way they make Ajax calls. John is a lead developer for both the ADOdb and PHPLens projects.

0 comments voice your opinion now!
upgrade php4 php5 experience painless phplens adodb upgrade php4 php5 experience painless phplens adodb


Christopher Jones' Blog:
Review Easy Oracle PHP
October 17, 2006 @ 07:05:26

Christopher Jones has reviewed one of the first Oracle PHP books that has been published ("Easy Oracle PHP: Create Dynamic Web Pages with Oracle Data") in his latest blog post today.

The writing style of Easy Oracle PHP is very clear. The book is relatively short at 264 pages but it focuses directly on PHP-Oracle interaction and does not need to be longer (though everyone will always wish for more).

Some topics covered in the book include the basics of PHP, the OCI8 model, using PEAR, using ADOdb, and installing the PHP5/Apache/PEAR combo. Christopher's opinion of the good overall is good, but notes that the target it would best fit with is for developers coming from Oracle to PHP (but will work as well for those coming the other way).

0 comments voice your opinion now!
book review easy oracle dynamic introduction pear oop adodb oci8 book review easy oracle dynamic introduction pear oop adodb oci8


PHPEverywhere:
New Improved Yummy ADOdb Session Handler
August 03, 2006 @ 12:06:33

New from John Lim today, there's this quick post on PHPEverywhere talking about the new and improved ADOdb session handler.

ADOdb, the database library i maintain, has had support for storing session data in a database for a long time. However there was one limitation that always continued to bug me: the fact that all the PHP servers using database-backed sessions needed to synchronize their times to ensure that the session timers worked properly.

In the latest version of this popular library, his bothersome limitation is gone. The Session2 implementation uses the database server clock to track times.

This requires us to change the database table format used, but that is a small price to pay for the added flexibility. You can read more in the ADOdb session docs.
0 comments voice your opinion now!
adodb database library session data timed server clock adodb database library session data timed server clock


PHPEveryhwere:
ADOdb Implementation of Active Record - cloning Zend_Db_DataObject
May 08, 2006 @ 05:49:16

John Lim has posted an example of using the ADOdb software he's a developer on to clone the functionality of Zend's Zend_Db_DataObject.

The Zend Framework Preview edition is out. I had look this morning at Zend_Db_DataObject, which is an implementation of the Active Record pattern. After reading the tutorial, decided to implement something similar for ADOdb. After a couple of hours coding, I had an implementation that works with both PHP4 and PHP5, and provides a superset of the functionality described in the above link.

ActiveRecord, a method of database usage where the tables can "self-define" in your script (and you work with objects instead of messing with columns) is cropping up more and more, and John gives a code example of how it can be used inside ADOdb as well. He also mentions some of the advantages to using this kind of code/library, including the fact that it will work with both PHP4 and PHP5.

0 comments voice your opinion now!
adodb framework activerecord zend_db_dataobject cloning adodb framework activerecord zend_db_dataobject cloning


PHP-it.net:
Creating a chat script with PHP and Ajax (Part 2)
April 04, 2006 @ 07:09:48

PHPit.net is following up This previous article with the next in the series today - Part Two of "Creating a chat script with PHP and Ajax".

Welcome to the second part of the 'Creating a chat script with PHP and Ajax' series. It's been a while since the previous part, and much has happened since then. 37Signals, a very popular "web 2.0" company, has released a web application called Campfire which is actually a chat script based on Ajax and Ruby on Rails, and it has many of the features we'll be implementing in this article series.

In this part we'll start from scratch again, but this time we'll start with a solid structure. Unlike the previous part, which was more or less a hack job, we'll start using JSON and several other libraries to make everything easier for us. I will also show you how to add a few more features, like a user list.

It's definitely good to see that they aren't just building on the previous structure, but setting asside time to really plan out the application before getting started. Instead of hacking together an application that "works, but just barely", they opt for using solid libraries like ADOdb and Prototype for the power behind the scenes.

Right off the bat, they show you how to set up the filesystem structure, the database structure, and the basic framework of PHP code for the client to interface with. From there, it's just the creation of the other pieces of the puzzle - the interface, functions to handle the login form, and a method to ping the server for new messages, and, of course, the backend to handle it all.

1 comment voice your opinion now!
create chat script ajax adodb prototype json-php create chat script ajax adodb prototype json-php



Community Events











Don't see your event here?
Let us know!


composer release component facebook hack introduction security overview example unittest symfony2 install package application podcast language hhvm opinion code framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework