PHP Classes
Icontem

Subject: I like this class concept as it offers great flexibility over...


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend!

      Synchronize DB   All threads   I like this class concept as it offers great flexibility over...   (Un) Subscribe thread alerts  
Subject:I like this class concept as it offers great flexibility over...
Summary:Package rating comment
Messages:2
Author:Alex Saavedra
Date:2008-09-05 14:10:57
Update:2008-09-06 08:41:45
 

Alex Saavedra rated this package as follows:

Utility: Good
Consistency: Insufficient
Examples: Sufficient

  1. I like this class concept as it offers great flexibility over...   Reply  
Picture of Alex Saavedra
Alex Saavedra
2008-09-05 14:10:57
I like this class concept as it offers great flexibility over which tables from your master DB you want to replicate in separate slave DBs. So I tried this class just out of the box, modifying a couple of lines in the provided "exemple.php" corresponding to DB credentials, and used sample data from some production database. To my surprise the INSERT statements failed as soon as single quotes were found in some VARCHAR fields.

I suggest you add some escaping functions prior to sending INSERTs in order for this class to work in the real world. You may use addslashes() or even better, mysql_real_escape_string(), yet even better, rely on some proved database abstraction layer (there are lots out there).

A. Saavedra

  2. Re: I like this class concept as it offers great flexibility ove   Reply  
Picture of Cristian Vrinceanu
Cristian Vrinceanu
2008-09-06 08:41:45
Thank you for your feedback.
I updated the class source file so that it escapes special characters of sql parameters.
Your input is always welcome.

Cristian Vrinceanu

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products