Author |
Message |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Thu Nov 11, 2004 8:06 am |
|
Okay the below is is the table...
Code:
CREATE TABLE `hits` (
`id` int(11) NOT NULL default '0',
`titel` varchar(250) NOT NULL default '',
`artiest` varchar(250) NOT NULL default '',
`label` varchar(150) NOT NULL default '',
`hp` smallint(6) NOT NULL default '0',
`aw` smallint(6) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
|
And its a litle script to ad an artist ,song,and a cd or whatever the song is on...
So only using....titel,artist, and label
Problem now is,is that i need a search form....that searches the database and returns every result.
So if i entered Let's Dance - David Bowie cd5
and i search for david.... i want every result...with david...in artist name.
Anyone with knowledge who can figure this out....? |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Nov 11, 2004 9:07 am |
|
Select * from hits where artiest like '%david%'; |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 9:16 am |
|
well thanks raven but that doesnt help....
i need a complete search for that has a search for artist and songtitle.
and then display results.... |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 9:23 am |
|
Well that's not what you asked for
Quote: | i want every result...with david...in artist name |
Select * from hits where artiest like '%david%' OR title1 like '%david%'; |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 9:27 am |
|
yeah i know but i thought that wasnt needed with all smarties here...
so to be clear.....
i need a search form that allowes me search on the artist name or song title |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 9:33 am |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 9:35 am |
|
yeah but this is habracadabra to me raven.
so im still stuck... |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 9:38 am |
|
this is how the search form looks like...
Code:
<TABLE BORDER = 0 CELLPADDING = 0 CELLSPACING = 0>
<FORM action="search.php" method=post target=main NAME="search">
<TR>
<TD width=75 align=right valign=bottom><span class="top-tekst">
<IMG src="img/top_search_artiest.gif" border=0><BR>
</TD>
<TD width=100 valign=bottom>
<INPUT type=text name=artiest size=27 class="zoeken"><BR>
</TD>
<TD width=55 align=right valign=bottom><span class="top-tekst">
<IMG src="img/top_search_titel.gif" border=0><BR>
</TD>
<TD width=55 valign=bottom>
<INPUT type=text name=titel size=27 class="zoeken"><BR>
</TD>
<TD width=55 valign=bottom>
<INPUT TYPE=image src="img/top_search_zoek.gif" Value=submit><BR>
</TD>
<TD>
|
only i cannot use the search php anymore so that mysql part has to be build .... |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 11:14 am |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 11:34 am |
|
okay so not everything can be solved here huh.... |
|
|
|
 |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Thu Nov 11, 2004 11:45 am |
|
patience... It is good to have here as well as in any tech help situation.  |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 1:15 pm |
|
well the things i have done to solve this myself ....
everytime i think i found a answer/example pieces are missing.
and for the coders here its a piece of cake...
he...he...patience....? |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 2:18 pm |
|
well update.....
ive got it working now....
some things need to be changed and finaly it worked....but now i have a big pain in head... |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 4:31 pm |
|
- Seriously, I felt that you had enough info to get it working and I took a chance on letting you try a while before offering anymore assistance  |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 4:34 pm |
|
yeah even the wall have a headache..
but this question is also for you raven......and willing to pay some for it....or who ever is first......
i have many lists like this....
Get Down Saturdaynight - Oliver Cheatham
Billie Jean - Michael Jackson
Valley Style - T. Sky Valley
Let The Music Play - Shannon
On The Upside - Xena
is it possible to make a script to import it into the database...? |
|
|
|
 |
Raven

|
Posted:
Thu Nov 11, 2004 4:53 pm |
|
Create a text file with all columns filled in, separated by a ,. For safety, enclose all values in " ". Since field1 is an autoincrement, in your text file use NULL (no quotes) as the value. Then, use this syntax to load it:
LOAD DATA INFILE '/tmp/filename.csv' INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3,field4,field5,field6); |
|
|
|
 |
hitwalker

|
Posted:
Thu Nov 11, 2004 4:55 pm |
|
any help in the creation cause i dont have a clue what this means raven ....  |
|
|
|
 |
|