muziek lijst in 1 x in database zetten
ik was bezig met top40 systeem waar mensen kunen stemmen maar ik moet ook nummers in hebben natuurlijk.
mijn vraag is hoe kan je in 1 x de hele muziek lijst in je query zetten.
hieronder zie je de code naar mijn doen (doet het niet).
bij id moet niks ingevult worden.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
mysql_query("INSERT INTO muziek (id,auteur,singel) VALUES('','The Opposites','Dom, lomp & famous ')");
?>
The Opposites - Dom, lomp & famous
Abba - Mama mia
David Guetta - Baby when the light
Gebroeders ko - Duiken in de zee
IOS - Hoofd Onder Water
Linda,Roos & Jessica - Ademnood
Stevie Wonder - I just called to say
U2 - With Or Without You
Nelly Furtado - Do it
The Opposites - Me nikes
U2 - Pride (In The Name Of Love)
September - Cry for you
Thomas berge - Jij bent mijn leven
High school musical 2 - I gotta go my own way
Bruce Springsteen - I'm On Fire
Tess - Stupid
Ilse de lange - I love you
Lara - That's it baby
Leona Lewis - Bleeding Love
Appa - Ik heb schijt
The Cranberries - Zombie (Techno Remix)
Bruce Springsteen - Working On The Highway
Kate Ryan - Voyage Voyage
DJ Tisto - Sweet things
Fragma - Toca's miracle (Richard Durand Mix)
Lucie Silvas - What you're made of
Fergie - Big girls don't cry
Madonna - La isla bonita
Queen - Thank God It's Christmas
Justin Timberlake & beyonce - Until the end of time
Charlie Lownoise & Mental Theo - Wonderful Days
Junkie XL - Fuck more
Cascada - Lonley
50cent - Window shopper
The KLF - Justified & ancient
Ernesto vs. Bastian - Thrill (Official trance energy anthem 2008)
Simple Minds - Don't You Forget About Me
Lupe Fiasco - Superstar
Colbie Caillat - The Little Things
The CrystallionZ - Sexy Mama
Pat Benatar - Love Is A Battlefield
Appa - Kijk door mijn ogen
Armand van Helden - You dont know me
David Guetta - Tomorrow can wait
Led Zeppelin - Stairway To Heaven
Leona Lewis - Bleeding love
Sandy Rivera & Haze - Freak
Seal - Amazing
Crazy Cats - Sloop John B
Will.I.Am - I got it from my mama
Gary Moore - Still Got The Blues
Bruce Springsteen - Born To Run
Simpley Red - Holding back the years
Scooter - Jumping All Over The World
Timbaland ft. Keri Hilson & Nicole Scherzinger - Scream
Deep Dish - Flashdance
Sugababes - Change
Snoop Dogg - Drop it like it's hot
Ali B - Groupie love
Red Hot Chili Peppers - Under The Bridge
Scooter - The question is what is the question
Faithless - Insomnia
Colbie Caillat - Bubbly
Roxette - Joyride
Gio - Ik denk aan jou
Alex C Ft. Y-Ass - Du hast den sch'nsten Arsch der Welt
50cent - Candy shop
Sugababes - About you now
BZN - The banjo man
Seal - Love's Divine
Bob Marley - No woman no cry
Mika - Happy ending
Uniting Nations - Out of touch
Mega Mindy - Toby Toby
Cascada - Ready for love
Ilse de lange - Great escape
Jan Smit - Dan volg je haar benen
Dire Straits - Sultans Of Swing
Amy Winehouse - Back To Black International Deluxe Edition
CRW - I Feel Love
Vanvelzen - When summer ends
Jumping Jacks - Your Smile
30 Seconds To Mars - A Beautiful Lie
Accu - In The City
Yanou feat. Mark Daviz - A girl like you
John Farnham - You're The Voice
Priscilla - It's Christmas Time
Carlos - Alanda
Pet shop boys - Go west
Prince - Money dont matter 2 night
Cascada - Bad Boy
Jannes - Ga maar weg
Toto - Stop loving you
Cascada - Endless Summer
Celine dion - Titanic
Timbaland feat. One Republic - Apologize
Nicole Scherzinger - Baby love
I'd Lie For You (And That's The Truth) - Meat Loaf
Gebroeders ko - Boten anna
mysql_query("INSERT INTO muziek (id,auteur,singel) VALUES('','The Opposites','Dom, lomp & famous ')");
?>
The Opposites - Dom, lomp & famous
Abba - Mama mia
David Guetta - Baby when the light
Gebroeders ko - Duiken in de zee
IOS - Hoofd Onder Water
Linda,Roos & Jessica - Ademnood
Stevie Wonder - I just called to say
U2 - With Or Without You
Nelly Furtado - Do it
The Opposites - Me nikes
U2 - Pride (In The Name Of Love)
September - Cry for you
Thomas berge - Jij bent mijn leven
High school musical 2 - I gotta go my own way
Bruce Springsteen - I'm On Fire
Tess - Stupid
Ilse de lange - I love you
Lara - That's it baby
Leona Lewis - Bleeding Love
Appa - Ik heb schijt
The Cranberries - Zombie (Techno Remix)
Bruce Springsteen - Working On The Highway
Kate Ryan - Voyage Voyage
DJ Tisto - Sweet things
Fragma - Toca's miracle (Richard Durand Mix)
Lucie Silvas - What you're made of
Fergie - Big girls don't cry
Madonna - La isla bonita
Queen - Thank God It's Christmas
Justin Timberlake & beyonce - Until the end of time
Charlie Lownoise & Mental Theo - Wonderful Days
Junkie XL - Fuck more
Cascada - Lonley
50cent - Window shopper
The KLF - Justified & ancient
Ernesto vs. Bastian - Thrill (Official trance energy anthem 2008)
Simple Minds - Don't You Forget About Me
Lupe Fiasco - Superstar
Colbie Caillat - The Little Things
The CrystallionZ - Sexy Mama
Pat Benatar - Love Is A Battlefield
Appa - Kijk door mijn ogen
Armand van Helden - You dont know me
David Guetta - Tomorrow can wait
Led Zeppelin - Stairway To Heaven
Leona Lewis - Bleeding love
Sandy Rivera & Haze - Freak
Seal - Amazing
Crazy Cats - Sloop John B
Will.I.Am - I got it from my mama
Gary Moore - Still Got The Blues
Bruce Springsteen - Born To Run
Simpley Red - Holding back the years
Scooter - Jumping All Over The World
Timbaland ft. Keri Hilson & Nicole Scherzinger - Scream
Deep Dish - Flashdance
Sugababes - Change
Snoop Dogg - Drop it like it's hot
Ali B - Groupie love
Red Hot Chili Peppers - Under The Bridge
Scooter - The question is what is the question
Faithless - Insomnia
Colbie Caillat - Bubbly
Roxette - Joyride
Gio - Ik denk aan jou
Alex C Ft. Y-Ass - Du hast den sch'nsten Arsch der Welt
50cent - Candy shop
Sugababes - About you now
BZN - The banjo man
Seal - Love's Divine
Bob Marley - No woman no cry
Mika - Happy ending
Uniting Nations - Out of touch
Mega Mindy - Toby Toby
Cascada - Ready for love
Ilse de lange - Great escape
Jan Smit - Dan volg je haar benen
Dire Straits - Sultans Of Swing
Amy Winehouse - Back To Black International Deluxe Edition
CRW - I Feel Love
Vanvelzen - When summer ends
Jumping Jacks - Your Smile
30 Seconds To Mars - A Beautiful Lie
Accu - In The City
Yanou feat. Mark Daviz - A girl like you
John Farnham - You're The Voice
Priscilla - It's Christmas Time
Carlos - Alanda
Pet shop boys - Go west
Prince - Money dont matter 2 night
Cascada - Bad Boy
Jannes - Ga maar weg
Toto - Stop loving you
Cascada - Endless Summer
Celine dion - Titanic
Timbaland feat. One Republic - Apologize
Nicole Scherzinger - Baby love
I'd Lie For You (And That's The Truth) - Meat Loaf
Gebroeders ko - Boten anna
Code (php)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
INSERT INTO
muziek (
auteur,
singel
)
VALUES(
'The Opposites',
'Dom, lomp & famous'
)
muziek (
auteur,
singel
)
VALUES(
'The Opposites',
'Dom, lomp & famous'
)
Dan laat je hem toch weg?
Quote:
bij id moet niks ingevult worden.
Niks is in sql iets anders dan ''.
'' is een lege string
NULL is niks
Maar zoals Frank al zei, je laat 'm beter weg.
Hoe bedoel je met die lijst, je wil die met 1 query in de database invoeren?
Gewijzigd op 01/01/1970 01:00:00 door Bo az
Code (php)
1
INSERT INTO muziek (id,auteur,singel) VALUES('','".$_POST['auteur']."','".$_POST['singel']."')
Doet het wel weet iemand oplossing ?
stel je voor dat een artiest "karel's janens's" heet :)
Code (php)
1
2
3
2
3
$vote_auteur = $_POST['auteur'];
$vote_singel = $_POST['singel'];
INSERT INTO muziek (id,auteur,singel) VALUES('$vote_auteur','$vote_singel')
$vote_singel = $_POST['singel'];
INSERT INTO muziek (id,auteur,singel) VALUES('$vote_auteur','$vote_singel')
Ook nog eens overzichtelijk =D
@Jouke: Doe wel iets aan beveiliging, jouw query loopt stuk op de eerste de beste quote ' in de tekst. mysql_real_escape_string() kan je hierbij helpen.