Categories > TinyButStrong general >

Confused

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ny10021
Date: 2005-03-01
Time: 07:56

Confused

I am stuck!  I've read the manual and the threads several times.  It seems simple, but somehow I am messing up.  I want to display all the rows in a mysql table.  But I am only able to spit out the first row.  Can anyone tell me what I'm doing wrong??  Thanks!

the html:
<html>
<head>
<title>Display Menu Items</title>
</head>
<body>

<table cellpadding="1" border="1" width="70%">
<tr>
  <td>{menu.id;block=tr}</td>
  <td>{menu.name}</td>
  <td>{menu.type}</td>
  <td>{menu.descr}</td>
  <td>{menu.price}</td>
</tr>
</table>


</body>
</html>

and the php:
<?php

include('conn.php'); //db connection
include_once('tbs_class.php');

$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('templates/menu.tmp.htm') ;

$TBS->MergeBlock('menu','mysql',"SELECT * FROM menu");

$TBS->Show() ;

?>
By: ny10021
Date: 2005-03-01
Time: 08:13

Re: Confused

Please disregard.  It was a really STUPID mistake.  It works now.
By: RwD
Date: 2005-03-01
Time: 09:44

Re: Confused

But for people who do not see the mistake in there. What is it?
By: ny10021
Date: 2005-03-01
Time: 10:58

Re: Confused

I was using { } instead of [ ].  It's always the details!
By: RwD
Date: 2005-03-01
Time: 16:26

Re: Confused

I didn't notice because I used to use the { } brackets before. But this helps people in the future with identifying their problems ;)
By: ny10021
Date: 2005-03-01
Time: 17:20

Re: Confused

Absolutely :-)