Location: PHPKode > scripts > TinyButStrong > examples/tbs_us_examples_datamysql.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TinyButStrong - Example of MySQL data merge</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./tbs_us_examples_styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Example of MySQL data merge</h1>
<div id="main-body">
  <div class="w3cinfo"> this TBS template is W3C compliant <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" style="border:none;" /></a> </div>
  <div id="example">
    <p style="text-align:center; color:#F00">This example is not working because there is no MySQL connection available. See the corresponding PHP script in order to configure the connection.<br />
    [onshow;block=p;when [var.sql_ok]=0]</p>
    <table border="1" cellpadding="2" cellspacing="0" style="margin-left:auto; margin-right:auto;">
      <tr class="title-section2" style="background-color:#CACACA;">
        <th align="left">Position</th>
        <th align="left">Nickname</th>
        <th align="center">Score</th>
        <th align="center">Date</th>
      </tr>
      <tr style="background-color:#F0F0F0;">
        <td>[blk1.#]</td>
        <td>[blk1.res_name;block=tr]</td>
        <td align="center">[blk1.res_score]</td>
        <td align="center">[blk1.res_date;frm='mm-dd-yyyy']</td>
      </tr>
      <tr style="background-color:#E6E6E6;">
        <td>[blk1.#]</td>
        <td>[blk1.res_name;block=tr]</td>
        <td align="center">[blk1.res_score]</td>
        <td align="center">[blk1.res_date;frm='mm-dd-yyyy']</td>
      </tr>
      <tr style="background-color:#FFCFB9;">
        <td colspan="4">[blk1;block=tr;nodata]There is no data. </td>
      </tr>
    </table>
    <p style="text-align:center;">There are [blk1.#] displayed lines.</p>
  </div>
</div>
</body>
</html>
Return current item: TinyButStrong