how to overwrite table?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
nielcleo
Forum Newbie
Posts: 3
Joined: Fri Nov 21, 2008 8:36 pm

how to overwrite table?

Post by nielcleo »

Help me pls for my problem here's my problem

:banghead: :banghead:

example i have this table order

Image

here's my problem now if i post new records it automatically ad new rows but i want to hapen is
overwrite the last row if u see the image have a row of P_Id's 1 2 3 if i will post new record it looks like this

Image

i hope u will help me for that
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: how to overwrite table?

Post by califdon »

That is an extremely strange thing to want to do. Without knowing why you think you want to do that, I can only tell you that you absolutely never want to change the person or thing represented by a primary key. Perhaps if you explain what it is that you are trying to achieve, we can help you do it the right way.
nielcleo
Forum Newbie
Posts: 3
Joined: Fri Nov 21, 2008 8:36 pm

Re: how to overwrite table?

Post by nielcleo »

okies if its to impossible to do that

teach meh how to put pages if the tables reach the 20 row and it will create new page
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: how to overwrite table?

Post by califdon »

nielcleo wrote:teach meh how to put pages if the tables reach the 20 row and it will create new page
I think what you are describing is how to display data 20 rows on a page, then let the user see the next 20 rows, etc. That is called pagination and there are lots of tutorials on how to do that. That is usually done with the the LIMIT clause of the SELECT statement of a query. You can learn about the LIMIT clause here: http://php.about.com/od/mysqlcommands/g/Limit_sql.htm and here: http://www.petefreitag.com/item/451.cfm. You can also learn about pagination in tutorials like: http://www.sitepoint.com/article/perfec ... agination/ and http://php.about.com/od/phpwithmysql/ss ... nation.htm. Forums are not good places to learn anything. They are more useful in answering specific questions.
Post Reply