GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 02-Sep-2004, 20:18
taldos taldos is offline
New Member
 
Join Date: Sep 2004
Posts: 1
taldos is on a distinguished road

Forum Thread: How to?


I used globa, and that is working fine. however I have come across another problem. and I think a fresh pair of eyes would do the trick.

PHP:
PHP Code:

<?
function thread_display($cat_id, $parent, $moderator) 
{ 
   $threadsql = "SELECT date, title, thread_id, name FROM roundtable_text WHERE (category_id='".$cat_id."' AND parent_id='".$parent."') ORDER BY date DESC"; 
   $threadresult = mysql_query($threadsql) 
        or diet("Could  not select actual PEACE browse list from DB"); 
        
        while ($row = mysql_fetch_array($threadresult)) 
          { 
           if($moderator) 
         { 
            global $t->set_var(array("TITLE" => $row['title']));  //<----- this is where I am getting a parse error; parse error, expecting `','' or `';'' 
            global $t->set_var(array("AUTHOR" => $row['name'])); 
            global $t->set_var(array("DATE" => $row['date'])); 
            global $t->set_var(array("TRASH" => "<a href=discussionDelete.php?cid='".$cat_id."'&tid='".$row['thread_id']."'> </a>")); 
            global $t->parse("BROWSE_OUTPUT", "THREADS_ROW", true); 
         } 
         else 
         { 
            global $t->set_var(array("TITLE" => $row['title'])); 
            global $t->set_var(array("AUTHOR" => $row['name'])); 
            global $t->set_var(array("DATE" => $row['date'])); 
            global $t->parse("BROWSE_OUTPUT", "THREADS_ROW", true); 
         } 
             
         if($row['child_id'] == 1) 
             { 
                thread_display($cat_id, $row['thread_id'], $moderator); 
             } 
          } 
      return; 
} 

?>




this script shoudl essenstially loop through the database and pull threads. displaying top tier threads first then if a child exists, displaying the child until completion.

if anyone can point me to a working script of threads I can take a look at it and maybe figure it out.

thanks.

ed.
Last edited by dsmith : 03-Sep-2004 at 08:26. Reason: Please use [php] & [/php] when posting php code
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can we promote a forum? 1800espresso Advertising & Affiliates Forum 7 05-Sep-2007 15:30
Promote my/your forum 3dx Member Announcements, Advertisements & Offers 1 27-Nov-2004 01:21
I thought this forum was dead [split: access violation] JdS GIDForums™ 3 04-Aug-2004 10:12

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 09:11.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.