Jump to content

Xander_Dee

New Members
  • Posts

    1
  • Joined

  • Last visited

Xander_Dee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I've been looking at this code and I have parts of it figured out. I would like to figure this out because it will help me build other features for my script. if(isset($_GET['id'])) { $id = intval($_GET['id']); if(isset($_SESSION['username'])) { $dn1 = mysql_fetch_array(mysql_query('select count(t.id) as nb1, t.title, t.parent, c.name from topics as t, categories as c where t.id="'.$id.'" and t.id2=1 and c.id=t.parent group by t.id')); if($dn1['nb1']>0) { SO above is saying Count topic id as nb1 (IDK) and select topic.parent category.name from topics. the t.id means topic.id? t.id is equal to t.id2 + c.id. i just don't understand the t.parent if you could just set id2 to eaqual category id so you can call all the topics that also have id2 set to the same category. but in this case I don't know why id2 and parent are being used and called upon. if someone knows how to explain the break down of whats happening it would help trumendously.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.