The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> SQL query in pyramid structure
Barbara
post Dec 17 2015, 04:59 PM
Post #1





Group: Members
Posts: 2
Joined: 17-December 15
Member No.: 23,837



Hi! I have problem with displaying sql query in pyramid structure (it is made like a table). I am working in Wordpress. I want to display name by his pyramid number and I want to show it in table (pyramid). I don't know what loop is best for that. I have made something like this: get_results("SELECT pyramid_number, CONCAT(name,' ',last_name) AS user_name FROM users");?>

And this is the first row of my pyramid. I have tried to put pyramid number inside <td> and user_name between <td></td> but obviously I don't know how.

<table class="pyramid">
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td if pyramid_number=1>user_name</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
CharlesEF
post Dec 17 2015, 07:07 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,688
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



I know nothing about Wordpress but if you are using PHP for this then you need to post your code.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Barbara
post Dec 18 2015, 02:29 AM
Post #3





Group: Members
Posts: 2
Joined: 17-December 15
Member No.: 23,837



QUOTE(CharlesEF @ Dec 18 2015, 01:07 AM) *

I know nothing about Wordpress but if you are using PHP for this then you need to post your code.


I don't understand. blush.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th January 2020 - 06:28 PM