• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP3 & MySQL

TheCorm

Diamond Member
Hello, Using PHP Admin....I was wondering if anyone knows of changing the field order easily while still keeping all the data.

ie, currently sorted say:

Products
Subgroup
Name
Details
Price
ID

and say want to change to:

Products
Subgroup
Name
ID
Details
Price

Thanks,

Corm

 
Why not run SQL queries to do this?

Add a new field named ' temp ' where ID will be moved to.

UPDATE tablename SET temp = ID


Now delete the original ID field and rename temp to ID.

I suggest you backup your table before doing this...
 
Yep - the order of the field names within the table structure is meaningless - and you can order the results of any query in any fashion you want. No need to change the table structure.
 
Yes, but as I directly edit into PHP, it is not meaningless....it would speed up editing time. We have decided we will develop a web page based editing page to do it, we can put them in any order there.

Corm
 
Back
Top