Page 1 of 1
how to overwrite table?
Posted: Fri Nov 21, 2008 9:04 pm
by nielcleo
Help me pls for my problem here's my problem
example i have this table order
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
i hope u will help me for that
Re: how to overwrite table?
Posted: Fri Nov 21, 2008 10:53 pm
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.
Re: how to overwrite table?
Posted: Fri Nov 21, 2008 11:53 pm
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
Re: how to overwrite table?
Posted: Sat Nov 22, 2008 11:32 am
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.