Jump to content


  • Posts

  • Joined

  • Last visited

About Froggaard

  • Birthday 07/08/1989

Profile Information

  • Location

Froggaard's Achievements


Newbie (1/7)



  1. Hello.I have this code $get_cart_info = mysql_query("select c.*,g.*,m.* from cart as c left join games as g on c.tid = g.id left join movies as m on c.tid=m.id where c.user = {$CURUSER['id']} GROUP BY c.tid") or die(mysql_error()); But what I need is when c.type is movie its only takes info from movies tabel, but still have to take everything out, because I both have movies and games in cart..Can it be done, or do I have to trying something else?
  2. Hello. I have this code, but how can I do so the latest news is shown and they other are closed? I can't figure it out by my self, there are ask you guys $res = mysql_query("select * from news order by added desc") or die(mysql_error());if (mysql_num_rows($res) > 0) { while ($news = mysql_fetch_assoc($res)) {$ret = ($CURUSER['class'] >= 10 ? " <a href='admin_news.php?action=edit&id={$news['id']}'><img src='{$SITEINFO['picdir']}edit.png' alt='Ret' title='Ret' /></a>":"");$slet = ($CURUSER['class'] >= 10 ? " <a href='admin_news.php?action=slet&id={$news['id']}'><img src='{$SITEINFO['picdir']}delete.png' alt='Slet' title='Slet' /></a>":"");$added = $news['added'];$newstext = $news['body'];if ($CURUSER) {$new = ($CURUSER['news_readed'] == 'no' ? "<img src='{$SITEINFO['picdir']}new.gif' alt='' border='0' />":"");}if ($news['youtube'] != "")$newstext .= "<br/><iframe title='YouTube video player' class='youtube-player' type='text/html' width='640' height='390' src='https://www.youtube.com/embed/$news[youtube]' frameborder='0' allowFullScreen></iframe>";$ud .= "<div style='background:;height:20px;text-align:center;'><span style='font-weight:bold;font-size:15pt;'>{$news['title']}</span>{$new}</div>n";$ud .= "<span style='font-weight:bold;text-decoration:underline;'><a href="javascript:klappe('{$news['id']}')">{$added}</a></span>{$ret}{$slet}n";$ud .= "<div style='margin-top:10px;padding:5px;display:none;' id='k{$news['id']}'>".text($newstext)."</div><hr />n";if ($CURUSER) {mysql_query("update users set news_readed = 'yes' where id = '{$CURUSER['id']}' limit 1") or die(mysql_error());}}}
  • Create New...