this mysql query with smarty
| From: | dr. zoidberg | Date: | Tue, 16 Mar 2004 19:11:46 +0000 |
| Subject: | this mysql query with smarty | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11130@lists.php.net to get a copy of this message | ||
Hello,
$a = mysql_query("Select a,b FROM t WHERE category=1")
while($a) {
$x = $a[a];
//some echo
//another query
$b = mysql_query("Select * FROM t WHERE subcategory=$x")
while ($b) {
//some echo
}
}
Poent is thet I have menus, parents with childes (childes are not parents) and I want to display them in smarty like this:
- Parent 1
-- Child 1
-- Child 2
- Patent 2
-- Child 3
Child have subid that is parent id.
TNX
--
Please do not CC me.