Page 1 of 1

Newbie question :)

Posted: Sun Feb 01, 2009 6:55 pm
by Tsongkie
Hello everyone, I'm new to php programming. Here's what I'm trying to accomplish:

I have a mysql database which is composed of:
line1
line2
line3
line4
and so on..

What I'm trying to do is get the first line on that database, show it in a page, and delete that line from the database.

Anyone can put me on the right track? Thanks in advance :)

Re: Newbie question :)

Posted: Sun Feb 01, 2009 7:19 pm
by requinix
I love it when people make up terminology because they don't know the right words.

Use a SELECT query to get the first row in the table, then a DELETE to delete it.

Opinion:
Not many circumstances where you should delete stuff from your database. Use a flag to mark something as [in]active or [un]usable, then select the first row that's active/usable.

Re: Newbie question :)

Posted: Sun Feb 01, 2009 7:29 pm
by Tsongkie
Kewl thanks :)

Can you post a link that has explanations to this mysql functions? I'm used to windows programming lol. This is quite a change

Re: Newbie question :)

Posted: Sun Feb 01, 2009 8:29 pm
by requinix