conor
New Member
hi,
I need to call just one column from a database with MySQL/PHP. I don't want to state how many rows I want so that it will take all of the rows and I can add more rows without changing this code.
The more tricky part of this is that i need to wrap tags around these rows. For Example i have a column with two rows called page1 and page2. I want to call the whole column from the database so that links to page1 and page2 will appear. But in the database it will just say page1 and page2, therefore i need to wrap link tags around the names.
The most importand thing is i cannot state how many rows i want, so that in the future if i add a page3 it will automatically be displayed on the page without me needing to add more to the PHP code. Also when i add a page3 i will want it to be a link aswell without me having to change anything. I'm probably getting into rough teritory here, my PHP isn't brilliant and i would apprechiate some help!
cheers
I need to call just one column from a database with MySQL/PHP. I don't want to state how many rows I want so that it will take all of the rows and I can add more rows without changing this code.
The more tricky part of this is that i need to wrap tags around these rows. For Example i have a column with two rows called page1 and page2. I want to call the whole column from the database so that links to page1 and page2 will appear. But in the database it will just say page1 and page2, therefore i need to wrap link tags around the names.
The most importand thing is i cannot state how many rows i want, so that in the future if i add a page3 it will automatically be displayed on the page without me needing to add more to the PHP code. Also when i add a page3 i will want it to be a link aswell without me having to change anything. I'm probably getting into rough teritory here, my PHP isn't brilliant and i would apprechiate some help!
cheers