Home « Help index « Formatting Codes «
Codes to format tables
SELECT articles.* FROM yacs_articles AS articles WHERE (articles.anchor LIKE 'section:4003') AND ((articles.active='Y') AND NOT ((articles.publish_date is NULL) OR (articles.publish_date <= '0000-00-00')) AND (articles.publish_date < '2026-11-19 17:27:24') AND ((articles.expiry_date is NULL) OR (articles.expiry_date <= '0000-00-00 00:00:00') OR (articles.expiry_date > '2026-11-19 17:27:24'))) ORDER BY rank, publish_date DESC, title LIMIT 0,7
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', publish_date DESC, title LIMIT 0,7' at line 1
On this page we are showing how to build simple tables. Use the char |, or tab, or two successive spaces, to separate column elements.
Table [table]...[/table]
In this example cells are separated by tabulation characters or by 2 spaces.
| Example | Rendering |
[table]
Rabbit Turtle
Stories Jean[nl]de la Fontaine
[/table] |
| Rabbit | Turtle |
| Stories | Jean
de la Fontaine |
|
Table [table=grid]...[/table]
In this example cells are separated by the | character.
| Example | Rendering |
[table=grid]
Rabbit|Turtle
Stories|Jean[nl]de la Fontaine
[/table] |
| Rabbit | Turtle |
| Stories | Jean
de la Fontaine |
|
Table [table=tiny]...[/table]
Actually any style can be applied to the generated table.
| Example | Rendering |
[table=tiny]
Rabbit|Turtle
Stories|Jean[nl]de la Fontaine
[/table] |
| Rabbit | Turtle |
| Stories | Jean
de la Fontaine |
|
Separate headers from the body [table]...[body]...[/table]
| Example | Rendering |
[table=grid]
First Name|Last Name
[body]
Rabbit|Turtle
Stories|Jean[nl]de la Fontaine
[/table] |
| First Name | Last Name |
| Rabbit | Turtle |
| Stories | Jean
de la Fontaine |
|
Explicit cells alignment
| Example | Rendering |
[table=grid]
left=Full Name| center=Birth Year| right=Net income
[body]
right=Speedy Rabbit|center=1888|$11,230
center=Jean de la Fontaine|center=1675|$234,567
[/table] |
| Full Name | Birth Year | Net income |
| Speedy Rabbit | 1888 | $11,230 |
| Jean de la Fontaine | 1675 | $234,567 |
|
Comma-separated values [table][csv]...[/csv][/table]
| Example | Rendering |
[table=grid]
[csv]
Net income for the year,$2.310
Net income for last year,$2.100
Net income increase,10%
[/csv]
[/table] |
| Net income for the year | $2.310 |
| Net income for last year | $2.100 |
| Net income increase | 10% |
|
Comma-separated values [table][csv=;]...[/csv][/table]
Using a different separator between cells.
| Example | Rendering |
[table=grid]
[csv=;]
Net income for the year;$2.310
Net income for last year;$2.100
Net income increase;10%
[/csv]
[/table] |
| Net income for the year | $2.310 |
| Net income for last year | $2.100 |
| Net income increase | 10% |
|