Jump to content

Uploading to PostgreSQL database


jlr2k8

Recommended Posts

Not sure with PostgreSQL myself but [url=http://forums.devshed.com/postgresql-help-21/storing-images-in-postgresql-database-10261.html]http://forums.devshed.com/postgresql-help-21/storing-images-in-postgresql-database-10261.html[/url] has a class there that someone uses for image uploads.

Just googled for it..

Regards
Liam
[quote author=businessman332211 link=topic=101454.msg402826#msg402826 date=1153769120]
exact same thing just change all the my's to po's
or pg I think it is
[/quote]

actually, there are several differences in PHP functions. simply changing the mysql_ to pg_ will guarantee breakage because even the pg_connect() is handled totally differently than mysql_connect():
[code]
<?php
// mySQL
$conn = mysql_connect("$host", "$user", "$pass");
mysql_select_db("$name", $conn);

// vs PostgreSQL
$conn = pg_connect("host=$host user=$user password=$pass dbname=$name");
?>
[/code]

in addition, your advanced queries are handled differently in Postgres, and many of your keywords are different as well. in fact, even your LIMIT cannot be handled the same way. no, there is much more to it than simply changing the prefix of your functions ;-)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.