1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP for dummies

Discussion in 'PHP' started by Betoneira, Nov 2, 2006.

  1. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #21
    I'm STILL unsure if you have the images stored in the database or in a folder. I won't be able to help until I know.
     
    nico_swd, Nov 5, 2006 IP
  2. Betoneira

    Betoneira Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Hello Nico

    The images are in a directory and they have these names from first image to last:

    01.jpg
    02.jpg
    etc...

    in the database the img field (defined as txt) only have the name of the file that the database will call:

    record 1 loads the 01.jpg
    record 2 loads the 02.jpg

    and so on...
     
    Betoneira, Nov 5, 2006 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #23
    This should work then for you.
     
    nico_swd, Nov 5, 2006 IP
  4. Betoneira

    Betoneira Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #24
    Thanks Very Mucu Nico, for your kindness.
     
    Betoneira, Nov 6, 2006 IP
  5. Betoneira

    Betoneira Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #25
    How can i sort the records from last to first?

    I want to show them from the last record (will be showed as first) to the 1st (will be the last)?

    I think this is this: SELECT * FROM table name ORDER variable.
    But is there a better way or this is the only one?
     
    Betoneira, Nov 6, 2006 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #26
    Add this at the end of the query.
    
    ORDER BY whateveryouwant DESC
    
    Code (markup):
    DESC can also be ASC, depending on the order you want.
     
    nico_swd, Nov 6, 2006 IP
  7. Betoneira

    Betoneira Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #27
    everything seems to work. You are a pro in php.
    I have many php toturials but everyone dont say everything more easily.

    thanks again. if i have more questions i will ask
     
    Betoneira, Nov 6, 2006 IP