Results 1 to 4 of 4

Thread: Web Dev Buffs Required! - Implimenting a MySQL database 'Recent Changes' in a page.

  1. #1
    Hexus.Lurker
    Join Date
    Jan 2010
    Posts
    357
    Thanks
    17
    Thanked
    13 times in 13 posts
    • Fortune117's system
      • Motherboard:
      • Gigabyte Z77-D3H
      • CPU:
      • Intel Core i5 3570k 3.4Ghz
      • Memory:
      • 8GB Corsair DDR3
      • Storage:
      • Kingston Hyper X 120GB SSD
      • Graphics card(s):
      • XFX Radeon 7870 DD Edition
      • PSU:
      • OCZ ZS Series 650 Watt
      • Case:
      • Coolermaster CM690
      • Operating System:
      • Windows 8 64-Bit
      • Monitor(s):
      • [Eyefinity] 3 LG 23EA63V
      • Internet:
      • Virgin Media 50MB

    Web Dev Buffs Required! - Implimenting a MySQL database 'Recent Changes' in a page.

    Ok guys, bearing in mind im only an IT student with one unit on Website Development under my belt id like you to make this simple for me.

    What im wanting to do is create a web page that is linked with a MySQL Database, I already have the required things to enter details into the database but I would like to have a 'Recent Changes' section of the web page so I can see what has been entered. Is there any way to do this?

    Cheers

    -Fortune

  2. #2
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb

    Re: Web Dev Buffs Required! - Implimenting a MySQL database 'Recent Changes' in a pag

    do you have control of the database?

    assuming it's a php backend?

    why not add an extra field for your 'stories' or whatever it is you're adding to the website so you can do a select query that is something like "now()-5 days" to get stories from the last 5 days?

    Mark

  3. #3
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,230
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: Web Dev Buffs Required! - Implimenting a MySQL database 'Recent Changes' in a pag

    As above - set up the database so that whenever something is entered it sets a date field to the current date & time, then do a select on that (you can probably use SELECT TOP xx ... ORDER BY datefield DESC - I think SELECT TOP is ANSI SQL and not an MS extension... ).

    If you're using MySQL from a recent version of PHP then make sure you do the data input using stored procedures in the database and parameterised queries in PHP - all helps avoid SQL injection

  4. #4
    Hexus.Lurker
    Join Date
    Jan 2010
    Posts
    357
    Thanks
    17
    Thanked
    13 times in 13 posts
    • Fortune117's system
      • Motherboard:
      • Gigabyte Z77-D3H
      • CPU:
      • Intel Core i5 3570k 3.4Ghz
      • Memory:
      • 8GB Corsair DDR3
      • Storage:
      • Kingston Hyper X 120GB SSD
      • Graphics card(s):
      • XFX Radeon 7870 DD Edition
      • PSU:
      • OCZ ZS Series 650 Watt
      • Case:
      • Coolermaster CM690
      • Operating System:
      • Windows 8 64-Bit
      • Monitor(s):
      • [Eyefinity] 3 LG 23EA63V
      • Internet:
      • Virgin Media 50MB

    Re: Web Dev Buffs Required! - Implimenting a MySQL database 'Recent Changes' in a pag

    Thanks guys!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •