+ Reply to Thread
Results 1 to 6 of 6

Thread: PHP and mysql picture system

  1. #1
    playminigames is offline x10 Sophmore playminigames is an unknown quantity at this point
    Join Date
    Jul 2009
    Location
    earth
    Posts
    216

    PHP and mysql picture system

    Ok so im developing this site, and i almost have the whole picture part working perfectly, except when i added the delete picture function it messes everything up. the reason for this is because say you have pictures

    1. 2. 3. 4.

    they all have an album id, and the system figures out the next picture based on this, and when you delete anything but the last one it still tries to go to the image that was deleted. im not sure if anyone can help with this, but if you need code or anything im willing to help you in anyway to fix it.

    Thanks!

  2. #2
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: PHP and mysql picture system

    Once you delete the picture then you have to update the whole list and get it refreshed the data which the function(system as you said) is using.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP and mysql picture system

    We always need to see a minimal test case, along with expected and actual behavior.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  4. #4
    playminigames is offline x10 Sophmore playminigames is an unknown quantity at this point
    Join Date
    Jul 2009
    Location
    earth
    Posts
    216

    Re: PHP and mysql picture system

    gsonline knows exactly what im talking about, but im not sure how to redo all of the numbers so there are no skipping from 1 to 3 or whatever. Can anyone point me to something like that, or give me an idea of how to code it. Thanks!

  5. #5
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: PHP and mysql picture system

    You are loading the images using the album id right. When you delete any picture then you have to re- fetch the images list again. so the next one in the list will be updated with the picture which is available.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  6. #6
    playminigames is offline x10 Sophmore playminigames is an unknown quantity at this point
    Join Date
    Jul 2009
    Location
    earth
    Posts
    216

    Re: PHP and mysql picture system

    i think i have come up with something, ill update when im done with it if it works or not.

    EDIT:

    Thanks everyone for their help, i got it working now!
    Last edited by playminigames; 11-15-2009 at 06:51 PM.

+ Reply to Thread

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 43
    Last Post: 03-24-2011, 07:27 AM
  2. PHP + MySQL CMS system for files
    By gamerdude in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 05-27-2008, 04:48 PM
  3. Process PHP from a MySQL array
    By tnl2k7 in forum Programming Help
    Replies: 12
    Last Post: 05-05-2008, 10:02 AM
  4. PHP & MYSQL Profiling System
    By arkitek in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 07-30-2005, 02:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers