Jump to content


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


Uploading to PostgreSQL database

Recommended Posts

I'm currently working on a website project, and I'm trying to build something where users can upload avatars to the database, instead of a folder. I have no idea how to set up that kind of system with PostgreSQL. Can someone tell me how to do this?

-Josh  8)

Share this post

Link to post
Share on other sites
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..


Share this post

Link to post
Share on other sites
[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

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():
// 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");

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 ;-)

Share this post

Link to post
Share on other sites


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.