I am creating a list of things that I want to display on the front-end of our site. I would like to know how I can setup the table to create 3 columns and loop all the data through it in alphabetical order.
I have attached a picture of MySQL Query and what it's displaying now. It only displays one column. I would like it to display 3 with the title at the top of each column.
Example 1 and 2 you have to change with your real columns from database. I suggested you when you make that query test him in phpmyadmin where you can see which data will be return.
Thank you for the reply. The only problem with that I have a list of of controls and I want to just display them on the site. The list if really big and we keep adding more and more.
Sorry but I did not quite understand what are you trying to achieve. Can you please explain me more and send me some example/screenshot so I can give you my suggestion.
What you trying to achive is not possible, because you have only one list(one column in table database) and the wpdatatables engine makes columns from it. Because of that you when you try to make table in wpdatatables you have only one column. It's not possible to make table with four columns of one column from database.
I am creating a list of things that I want to display on the front-end of our site. I would like to know how I can setup the table to create 3 columns and loop all the data through it in alphabetical order.
I have attached a picture of MySQL Query and what it's displaying now. It only displays one column. I would like it to display 3 with the title at the top of each column.
Thank you for you help
Hi ShopFloorAutomations,
Thank you for your purchase.
If you want to show more columns in table you must select them from database. In your example you select only Controls. If you want more add after
SELECT wp_cnc_controls.Controls, wp_cnc_controls.Example1,wp_cnc_controls.Example2...
Example 1 and 2 you have to change with your real columns from database. I suggested you when you make that query test him in phpmyadmin where you can see which data will be return.
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Milan,
Thank you for the reply. The only problem with that I have a list of of controls and I want to just display them on the site. The list if really big and we keep adding more and more.
http://shopfloorautomations.com/support/rs232-serial-cables-cnc-compatibility/
(The current list I just typed them all out)
I would think there should be a way to build a table and just have the one list loop through them.
Hi ShopFloorAutomations,
Sorry but I did not quite understand what are you trying to achieve.
Can you please explain me more and send me some example/screenshot so I can give you my suggestion.
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Milan,
Thank you for getting back to me again.
What I trying to do is create a one list of 100's of items. I want to display them on our site but in a table.
in a PHP file we could do something like this that will take the info
$tab = [1, 2, 3, 4, 5, 6, 7, 8, 9];
$max = count($tab);
echo "<table>";
for($i=0;$i<$max;$i=$i+4){
echo '<tr>';
for($x=0;$x<4;$x++){
if($x+$i>=$max){
continue;
}else{
echo '<td>'.$tab[($x+$i)].'</td>';
}
}
echo '</tr>';
}
echo "</table>";
My goal is to take one list out of the database and display it like the attached image.
Thank you again for your help
Hi JoshuaJRay,
What you trying to achive is not possible, because you have only one list(one column in table database) and the wpdatatables engine makes columns from it. Because of that you when you try to make table in wpdatatables you have only one column. It's not possible to make table with four columns of one column from database.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables