Coding My Own Script

Started on the old forum in April 2008 · view the original in the archive · old links redirect here

2 replies · 569 views · started 18 years ago · 2 min read

2 participants
SpiderWap Lead · 622 posts #1

Hi there.

I'm bizzy coding a new script again and i've been wondering about something... I want to add a search engine to it but i dont wana do acurate searches.

For example i just type in doors it must return 3 doors down

Heres my database sofar, im gana do the script, search by artist or title...

Well my script is already functioning, but ya, please help me out?

Thanx External image (may be gone)

--
-- Table structure for table `amrs`
--

CREATE TABLE `amrs` (
  `id` int(100) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `artist` varchar(50) NOT NULL default '',
  `itemurl` varchar(255) NOT NULL default '',
  `downloads` varchar(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;

--
-- Dumping data for table `amrs`
--

INSERT INTO `amrs` VALUES(1, 'Bee Attack', '94.7', '[url]http://spiderwap.co.za/downloads/funny_tones/94.7-bee_atack.amr'[/url], '1');

-- --------------------------------------------------------

--
-- Table structure for table `mmfs`
--

CREATE TABLE `mmfs` (
  `id` int(100) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `artist` varchar(50) NOT NULL default '',
  `itemurl` varchar(255) NOT NULL default '',
  `downloads` varchar(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;

--
-- Dumping data for table `mmfs`
--

-- --------------------------------------------------------

--
-- Table structure for table `mp3s`
--

CREATE TABLE `mp3s` (
  `id` int(100) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `artist` varchar(50) NOT NULL default '',
  `itemurl` varchar(255) NOT NULL default '',
  `downloads` varchar(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;

--
-- Dumping data for table `mp3s`
--

INSERT INTO `mp3s` VALUES(1, 'Be Like That', '3 Doors Down', '[url]http://spiderwap.co.za/downloads/mp3s/3_Doors_Down-Be_Like_That.mp3'[/url], '24');

-- --------------------------------------------------------

--
-- Table structure for table `polys`
--

CREATE TABLE `polys` (
  `id` int(100) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `artist` varchar(50) NOT NULL default '',
  `itemurl` varchar(255) NOT NULL default '',
  `downloads` varchar(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;

--
-- Dumping data for table `polys`
--

INSERT INTO `polys` VALUES(1, 'Hou My Vas', 'Amor', '[url]http://spiderwap.co.za/downloads/afrikaanse_polys/Amor_HouMyVas.midi'[/url], '1');

-- --------------------------------------------------------

--
-- Table structure for table `waves`
--

CREATE TABLE `waves` (
  `id` int(100) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `artist` varchar(50) NOT NULL default '',
  `itemurl` varchar(255) NOT NULL default '',
  `downloads` varchar(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;

--
-- Dumping data for table `waves`
--

Oh yes, and i'm looking for a small code that would allow users to have for example a 5 second preview of the track they download...

wizard Senior · 493 posts #2

for your search use mysql LIKE for example in an accurate search you would put

WHERE title='".$keyword."'

use

WHERE title LIKE '%".$keyword."%'

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close