Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-05-2012, 10:44 PM   PM User | #1
joshmcbride
New to the CF scene

 
Join Date: Aug 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
joshmcbride is an unknown quantity at this point
Swapping Items In A Table

Hi Guys!

Here's a query that all you novice's will most certainly will be able to solve.

I was building a website for my dad and then I got thinking, what if I wanted to do this for a living?

So I started messing around, and this popped into my head, and I cannot figure out how to solve it!

I want to swap information saved in MYSQL database every hour.

For example, in the first hour 'blurb 1' will show, then, at the strike of the hour, 'blurb 2' will show, and the same thing happens until the table is empty.

So basically I need the coding to swap this information, but after each piece blurb has been showed, I want it deleting from that table.

Any chance of a hand guys?

Cheers,

Joshiie
joshmcbride is offline   Reply With Quote
Old 08-06-2012, 10:47 AM   PM User | #2
MarkR
New Coder

 
Join Date: Sep 2011
Posts: 80
Thanks: 0
Thanked 13 Times in 12 Posts
MarkR is an unknown quantity at this point
What do you have so far? Have you investigated PHP's prepared statements and methods of interacting with the MYSQL database?
__________________
Web Design Newcastle
MarkR is offline   Reply With Quote
Old 08-06-2012, 01:27 PM   PM User | #3
joshmcbride
New to the CF scene

 
Join Date: Aug 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
joshmcbride is an unknown quantity at this point
I can connect to my database, My table will be called 'hour_offer' and the columns in that table will be called 'Barcode' and 'OfferPrice'

I have been working on this and scrapped everything I had tried because it wouldn't work! I can list products, and put information on a page using set criteria that links to MYSQL I just cannot figure out this swapping and timing stuff!

any links to example, or anyone who has done this in the past and knows how it works, any advice, it will all be appreciated!
joshmcbride is offline   Reply With Quote
Reply

Bookmarks

Tags
code, mysql database, php, swapping, timings

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:09 AM.


Advertisement
Log in to turn off these ads.