• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get uploaded picture from mysql database

#19
[eluser]CroNiX[/eluser]
I would only store the image name in the db. If you store the whole url including host name and dir paths, if you ever change servers (or dir structure) you have a lot of work to do since everything in the db would now be wrong. If you only store the filename, then nothing changes except you update one thing (the path), and you would just use site_url() for generating hostname portion.

For instance, you have everything hardcoded in the db for "localhost" server. What happens when you put this on a real server? None of that will work any longer.


Messages In This Thread
Get uploaded picture from mysql database - by El Forum - 10-12-2012, 01:22 AM
Get uploaded picture from mysql database - by El Forum - 10-12-2012, 02:20 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 12:38 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:26 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:37 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:39 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:40 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:41 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:43 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:45 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:47 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:52 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:55 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 02:02 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 02:20 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 02:23 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 02:26 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 02:31 AM
Get uploaded picture from mysql database - by El Forum - 10-15-2012, 01:36 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.