08-27-2013, 07:37 PM,
(This post was last modified: 08-27-2013, 07:39 PM by icedlava.)
|
|
icedlava
Senior Member
   
|
Posts: 80
Threads: 9
Joined: Sep 2012
|
|
RE: Catering for postgres and mysql
Hmm now i look at the DB_escape_string() function I'm finding it a problem. It not only escapes the string but also applies htmlspecialchars to it. This is ok if we are outputting to HTML, but I think it is causing problems to store the string in the database already entity encoded.
Should we revise this? Do we need to separate out this functionality to have escaping for db storage, and second to prep for output to HTML?
Thanks.
Hi Phil,
(08-27-2013, 07:37 PM)phil Wrote: A few years ago we had full compatibility with postgres... we do have a ConnectDB_postgres.inc somewhere which has all the abstracted DB functions for postgres in .. there was no champion to maintain postgres and test it and I didn't wish to do it so we (I) let it go.
Yes, I can understand the work involved in trying to maintain for postgres and it's evolution as well as for mysql/mysqli. Perhaps we can look at it again when we have more time.
Thanks,
|
|
08-28-2013, 12:33 PM,
(This post was last modified: 08-28-2013, 12:38 PM by TurboPT.)
|
|
TurboPT
Administrator
      
|
Posts: 727
Threads: 10
Joined: Jun 2012
|
|
RE: Catering for postgres and mysql
Know that according to php.net, the older [according to them] mysql functions will be considered deprecated as of 5.5.0.
This message appears with each function under their mysql documentation, such as mysql_fetch_array():
php.net Wrote:Warning
This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Alternatives to this function include:
mysqli_fetch_array()
PDOStatement::fetch()
Here's a little more info from their FAQ, concerning the deprecation:
php.net Wrote:Why is the MySQL extension (ext/mysql) that I've been using for over 10 years discouraged from use? Is it deprecated? What do I use instead? How can I migrate?
There are three MySQL extensions, as described under the Choosing a MySQL API section. The old API should not be used, and one day it will be deprecated and eventually removed from PHP. It is a popular extension so this will be a slow process, but you are strongly encouraged to write all new code with either mysqli or PDO_MySQL.
|
|
09-03-2013, 10:49 PM,
|
|
tomglare
Member
 
|
Posts: 31
Threads: 13
Joined: Feb 2012
|
|
RE: Catering for postgres and mysql
It would be a bonus to maintain postgres connectivity if someone can devote themselves to it, but I am not sure if the demand for postgres justifies making it a major priority. Like many people, I would not have touched mysql when it first appeared because it had little inbuilt integrity, in particular lacking foreign keys, but for most purposes it has since caught up with postgres. I still much prefer postgres, particularly the command line tools, but can not afford to spend too much time swimming against the tide.
|
|
|