Title: Populate Ultimate Tables with a PHP script?
Last modified: August 21, 2016

---

# Populate Ultimate Tables with a PHP script?

 *  [tonirtola](https://wordpress.org/support/users/tonirtola/)
 * (@tonirtola)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/populate-ultimate-tables-with-a-php-script/)
 * Can I use my custom PHP script to populate rows in Ultimate Tables?
 * [http://wordpress.org/plugins/ultimate-tables/](http://wordpress.org/plugins/ultimate-tables/)

Viewing 1 replies (of 1 total)

 *  [fbecerra123](https://wordpress.org/support/users/fbecerra123/)
 * (@fbecerra123)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/populate-ultimate-tables-with-a-php-script/#post-4459343)
 * It’s been really long time since you posted this question, but I had the same
   question and found a solution, maybe it is not elegant but it works:
 * $sql = “SELECT attr1, attr2, attr3, attr4, attr5 from myTABLE;
    $result = $conn-
   >query($sql);
 * $ivalue = “header1t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hggHeader2t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hggHeader3t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hggHeader4t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hggHeader5t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hgg”;
 * $count = 0;
 * if ($result->num_rows > 0) {
    // output data of each row while($row = $result-
   >fetch_assoc()) { $ivalue = $ivalue . $row[“attr1″] .”t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hgg”.
   $row[“attr2″] .”t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hgg” . $row[“
   attr3″] .”t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hgg” . $row[“attr4″].”
   t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hgg” . $row[“attr5″] .”t6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndt6r4ndkh6gfd57hgg”;
   $count = $count + 1; } }
 * $sql1 = “UPDATE wp_XXXXXX_ultimatetables SET width = 5, height = $count, width_thumbnail
   = 5, time =NULL, ivalues = ‘$ivalue’ WHERE id = 1”;
 * Cheers!

Viewing 1 replies (of 1 total)

The topic ‘Populate Ultimate Tables with a PHP script?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-tables_eeeff0.svg)
 * [ULTIMATE TABLES](https://wordpress.org/plugins/ultimate-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-tables/reviews/)

## Tags

 * [custom php](https://wordpress.org/support/topic-tag/custom-php/)

 * 1 reply
 * 2 participants
 * Last reply from: [fbecerra123](https://wordpress.org/support/users/fbecerra123/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/populate-ultimate-tables-with-a-php-script/#post-4459343)
 * Status: not resolved