Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
PHP
I have a table of menu in my database with two columns. first one is the id and other one is the name. Now i want to add the one more column in the table by the name of sub-menu (As it admin depend to add the sub-menu or not) Now please tell me how can insert the sub-menu to the table as column by giving the rights to the user. As user have choice to add the sub-menu in the some name or may be not

After showing that i want to show it to the page by using the do while loop. please also tell me what is the syntax of it in PHP that
do
statement..
while(column of row not ended)

What I have tried:

I have save the data values in database of first two columns. Now what is the logic for creating and saving third column and also the show using the syntax as do while loop?
Posted
Updated 18-Aug-16 2:07am

1 solution

You need to do the following:
SQL Tutorial[^] AND PHP 5 Tutorial[^]

Because . . . obviously, had you created the initial table yourself, you'd know how to add a column to it. So you need to learn SQL. And you need to study how to access a database via php (and you may need add-ons if you're not using MySQL).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900