8 Replies - 1864 Views - Last Post: 13 February 2005 - 07:52 PM Rate Topic: -----

#1 Menekali  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-February 05

Images In Db Or Rand. File?

Posted 12 February 2005 - 06:47 AM

Hey all (new here). Im wondering which is better for use with PHP. Im working on a user based system, where people are going to be able to have 'offerings' , 'requests' or 'donations' for an online game (basically an online trading system outside of the game).

One of the features im planning on is a screenshot of the item. So i was thinking which would be better? Have php store the images into randomized directories then have the script pull it out of there? Or store and retrieve it from a db?

This post has been edited by Menekali: 12 February 2005 - 07:00 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Images In Db Or Rand. File?

#2 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Images In Db Or Rand. File?

Posted 12 February 2005 - 07:33 AM

I personaly would have the image file path stored in a db with a unique ID. So that when the ID is called it returns the image path and then you could do a whole lot of neat things like that.

Reasons, well IMHO files are TONS easier to work with then databases for data like this. Also you could have the image change without alot of hassle.


But I suppose it is really up to your liking.

[edit] Take my avatar for instance. It's all file based and slightly edits the images to have a border on them. I don't think you could do that with images stored in a db. http://josherickson....avatar.png?list

This post has been edited by hotsnoj: 12 February 2005 - 07:35 AM

Was This Post Helpful? 0
  • +
  • -

#3 Menekali  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-February 05

Re: Images In Db Or Rand. File?

Posted 12 February 2005 - 09:01 AM

That sounds like a good idea indeed. Could you in anyway structurally help me a bit, maybe some code? Im really immersed in this, and am excited about doing it.

Also i was wondering if there were any auth type, 'user system' examples anyone might have for me to study from. I do study friends code, and vb / ibf, but i like the code often posted here as it is clearly, and very nicely commented to help understand everything and learn as you go.

Thanks in advance =D
Was This Post Helpful? 0
  • +
  • -

#4 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Images In Db Or Rand. File?

Posted 12 February 2005 - 09:21 AM

see http://josherickson....atar.png?source for how it's done.
Was This Post Helpful? 0
  • +
  • -

#5 Menekali  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-February 05

Re: Images In Db Or Rand. File?

Posted 12 February 2005 - 04:02 PM

Looks good man thanks. Ill go through it and try to understand everything going on, if i run into problems ill be sure to ask for help =D Thanks.
Was This Post Helpful? 0
  • +
  • -

#6 SpaceMan  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 10
  • View blog
  • Posts: 507
  • Joined: 20-February 03

Re: Images In Db Or Rand. File?

Posted 12 February 2005 - 09:38 PM

although SQL is more secure if users upload, 0777 on dir is secrurity risk, though very rare that it is a problem, the files can be deleted by a hacker. not happen very often, but can be done.
storing pics in data base not recomended IMO, datbase gets to bulky to fast.

This post has been edited by SpaceMan: 12 February 2005 - 09:39 PM

Was This Post Helpful? 0
  • +
  • -

#7 SpaceMan  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 10
  • View blog
  • Posts: 507
  • Joined: 20-February 03

Re: Images In Db Or Rand. File?

Posted 12 February 2005 - 09:45 PM

i recently wrote a user auth system, haveent released it yet so to speek.

wanted a bit of feed back on it.

Demo
Was This Post Helpful? 0
  • +
  • -

#8 Menekali  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 11-February 05

Re: Images In Db Or Rand. File?

Posted 13 February 2005 - 03:36 PM

SpaceMan, on Feb 12 2005, 09:45 PM, said:

i recently wrote a user auth system, haveent released it yet so to speek.

wanted a bit of feed back on it.

Demo

Thank you for the demo. And thank you for the pm as well. Do you plan on releasing it any time soon? This sounds like what i'd like to use for mine, but i'd really like to lean off of it. Im going to be incorporating the whole thing together no matter what decide to do (the users posting their materials and such).
Was This Post Helpful? 0
  • +
  • -

#9 SpaceMan  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 10
  • View blog
  • Posts: 507
  • Joined: 20-February 03

Re: Images In Db Or Rand. File?

Posted 13 February 2005 - 07:52 PM

what i meen by release, is that i have not posted links to it(advertise), exept for here. and no download on my site.

but if you want to try it, send me email from my site and i send it.
still working on the help file as i go. and a 2 variables edited in odd lacations before you upload it.
just looking to debug so to speek(make it user freindly), inform me of any problems etc.

Quote

Thank you for the demo. And thank you for the pm as well. Do you plan on releasing it any time soon? This sounds like what i'd like to use for mine, but i'd really like to lean off of it. Im going to be incorporating the whole thing together no matter what decide to do (the users posting their materials and such).

This post has been edited by SpaceMan: 13 February 2005 - 08:32 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1