How show related videos of this table

Discussion in 'PHP' started by earngate, Apr 29, 2013.

  1. #1
    Hi,
    we have script that import videos from youtube, need related videos by like title or keywords or category number to show in video page details

    we used symbol like #%c%# in video template to show category number
    and this is structure of table

    `n` int(10) unsigned NOT NULL auto_increment,
      `title` varchar(255) default NULL,
      `description` text,
      `keywords` text,
      `picture` varchar(255) default NULL,
      `map` text,
      `c` text,
      `c_path` text,
      `name` varchar(255) default NULL,
      `email` varchar(255) default NULL,
      `owner` int(10) unsigned NOT NULL default '0',
      `created` int(10) unsigned NOT NULL default '0',
      `updated` int(10) unsigned NOT NULL default '0',
      `password` varchar(15) default NULL,
      `rating` decimal(4,2) unsigned NOT NULL default '0.00',
      `votes` mediumint(8) unsigned NOT NULL default '0',
      `youtube_id` varchar(20) default NULL,
      `youtube_length` int(10) unsigned NOT NULL default '0',
      `youtube_thumbnail` varchar(255) default NULL,
      `video_code` text,
      `hits` int(10) unsigned NOT NULL default '0',
      `hits_m` int(10) unsigned NOT NULL default '0',
      `comments` mediumint(8) unsigned NOT NULL default '0',
      `popular` tinyint(1) NOT NULL default '0',
      `pick` tinyint(1) NOT NULL default '0',
      `t1` int(10) unsigned NOT NULL default '0',
      `t2` int(10) unsigned NOT NULL default '0',
      `status` set('enabled','disabled','queue','wait') NOT NULL default '',
      `en_cats` tinyint(1) NOT NULL default '0',
      `rewrite_url` text,
      PRIMARY KEY  (`n`,`status`),
      KEY `title` (`title`),
      KEY `t1` (`t1`),
      KEY `t2` (`t2`),
      KEY `status` (`status`),
      KEY `en_cats` (`en_cats`),
      FULLTEXT KEY `keywords` (`keywords`),
      FULLTEXT KEY `c` (`c`),
      FULLTEXT KEY `c_path` (`c_path`),
      FULLTEXT KEY `title_2` (`title`,`keywords`)
    Code (markup):
    Regards
     
    earngate, Apr 29, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    WHERE `yourfield` LIKE '%yourkeyword%'
     
    EricBruggema, Apr 29, 2013 IP