Results 1 to 2 of 2

Thread: how to write mysql right for this...

  1. #1
    Join Date
    Mar 2010
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy how to write mysql right for this...

    I want to get data from another db i have this sql

    http://purge.mine.nu/mysqlhelp.html <= output of php file


    The $row['class'] is in sed_users and what i know from befor i used the ft_id to get the data but i have forgotten how i did it

    Thanks in advance.
    PHP Code:
    $row['ft_lastposturl'] = ($usr['id']>&& $row['ft_updated'] > $usr['lastvisit']) ? 
    "<a class=\"armory_tt_class_".$row['class']."\" href=\"forums.php?m=posts&amp;q=".$row['ft_id']."&amp;n=unread#unread\">".$row['ft_lastpostername']."</a>" 
    "<a class=\"armory_tt_class_".$row['class']."\" href=\"forums.php?m=posts&amp;q=".$row['ft_id']."&amp;n=last#bottom\">".$row['ft_lastpostername']."</a>"

  2. #2
    Join Date
    Mar 2010
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Any idé how to do this at all?

    Atm im trying this code

    $sql_class = sed_sql_query("SELECT c.*, u.class FROM sed_forum_topics AS c
    LEFT JOIN sed_users AS u ON u.user_id=c.ft_lastposterid
    WHERE ft_sectionid='$ft_id' ORDER BY ft_sectionid ASC");
    $row_class = sed_sql_fetcharray($sql_class);

    but ain't having that mutch of an luck atm.


    Thanks in advance.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •