salhzmzm
02-07-2010, 10:32 AM
Hi
Let's say that I have table in my database called "Pages" and this table contains these fields :
id
name //name of the page
ord_page //order the page
visible //0 : not visible, 1:visible
My proplem is that when a user want to submit new page with these data, for example: (about, 1, 1) , and maybe there is a page ( row) in database have the same value in "ord_page" like "index", so I need a solution that can solve this proplem.
Further info, I need some solution to update the "ord_page" field in my database when a user update, insert or delete any page (row) from database so I can order the resaults (SELECT * FROM pages ORDER BY ord_page) with this field "ord_page".
Let's say that I have table in my database called "Pages" and this table contains these fields :
id
name //name of the page
ord_page //order the page
visible //0 : not visible, 1:visible
My proplem is that when a user want to submit new page with these data, for example: (about, 1, 1) , and maybe there is a page ( row) in database have the same value in "ord_page" like "index", so I need a solution that can solve this proplem.
Further info, I need some solution to update the "ord_page" field in my database when a user update, insert or delete any page (row) from database so I can order the resaults (SELECT * FROM pages ORDER BY ord_page) with this field "ord_page".