Jump to content


Photo

Uploading to PostgreSQL database


  • Please log in to reply
4 replies to this topic

#1 jlr2k8

jlr2k8
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationIssaquah, WA

Posted 22 July 2006 - 08:01 AM

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?

Thanks!
-Josh  8)

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 22 July 2006 - 01:59 PM

Not sure with PostgreSQL myself but http://forums.devshe...base-10261.html has a class there that someone uses for image uploads.

Just googled for it..

Regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 jlr2k8

jlr2k8
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationIssaquah, WA

Posted 24 July 2006 - 06:48 PM

thank you!!! now i get it!  ;D

-Josh

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 24 July 2006 - 07:25 PM

exact same thing just change all the my's to po's
or pg I think it is

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 24 July 2006 - 07:40 PM

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

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 ;-)
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users