Jump to content

db call


far2slow

Recommended Posts

i want to know if there is away i can get rid off t.roworder and t.place in sql there action is COUNT( * ) AS `Rows` , `place`        and            COUNT( * ) AS `Rows` , `roworder`  so can i add somthing to the php that will let me do this with out the sql

 

 $request = $smcFunc['db_query']('', '
      SELECT mg.id_group, mg.group_name, mg.online_color, mg.stars, t.place, t.roworder
      FROM ({db_prefix}membergroups AS mg, {db_prefix}team AS t)
      WHERE mg.id_group = 1
      ORDER BY t.roworder', array()
   );

   while ($row = $smcFunc['db_fetch_assoc']($request))
   {
      $row['stars'] = empty($row['stars']) ? array('', '') : explode('#', $row['stars']);

      $context['display_groups'][$row['place']][$row['id_group']] = array(
         'name' => $row['group_name'],
         'color' => $row['online_color'],
         'image' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row['stars'][1]) ? $settings['images_url'] . '/' . $row['stars'][1] : '') . '" alt="*" border="0" />', empty($row['stars'][0]) || empty($row['stars'][1]) ? 0 : $row['stars'][0]),
         'members' => array(),
         'place' => $row['place'],
      );

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.