TheTestTube.com  

Go Back   TheTestTube.com > TTTechnology > Computers
User Name
Password
Home FAQ Members List Calendar Today's Posts

Computers Ask about your system/software issues here, or discuss the latest in the field.

Reply
 
Thread Tools Display Modes
Old 04-28-2005, 09:10 PM   #1
raublekick
Moderator
 
raublekick's Avatar
 

Join Date: Oct 2004
Location: Lancastuh, PA
Posts: 1,678
raublekick is an unknown quantity at this point
Send a message via AIM to raublekick
php/mySQL help

hey dudes and dudettes, hopefully someone can help me:

here is where i am stuck now:
i have three sets of queries that insert into seperate tables and then try to view the data that was just inserted. the insertions all work, but only the second SELECT query works. they just don't display the information even though it is in the database. here they are:

not working:
$query = 'INSERT INTO Review (ReviewTitle, ReviewType, Rating, ArtistID, AlbumID, Text, Link, Picture, AuthorID, Date)
VALUES ("'.$reviewtitle.'", "'.$reviewtype.'", "'.$rating.'", "'.$muartist.'", "'.$mualbum.'", "'.$reviewtext.'", "'.$date.'", "'.$url.'", "'.$imageurl.'", "'.$authorname.'")';
$result = mysql_query($query) or die("Query failed: ".mysql_error().$query);
echo "<tr><td><p><strong>Added into Review table<strong></p></td></tr>:";
$query = 'SELECT ReviewTitle, ReviewType, Rating, ArtistID, AlbumID, Text, Link, Picture, AuthorID, Date
FROM Review
WHERE (ArtistID = "'.$muartist.'") AND (AlbumID = "'.$mualbum.'") AND (AuthorID = "'.$authorname.'")';
$result = mysql_query($query) or die("Query failed: ".mysql_error().$query);


working:
$query = 'INSERT INTO Artist (ArtistID, AlbumID) VALUES ("'.$muartist.'", "'.$mualbum.'")';
$result = mysql_query($query) or die("Query failed: ".mysql_error().$query);
echo "<tr><td><p><strong>Added into Artist table<strong></p></td></tr>:";
$query = 'SELECT ArtistID, AlbumID
FROM Artist
WHERE (ArtistID = "'.$muartist.'") AND (AlbumID = "'.$mualbum.'")';
$result = mysql_query($query) or die("Query failed: ".mysql_error().$query);


not working:
$query = 'INSERT INTO Album (AlbumID, ReleaseYear) VALUES ("'.$mualbum.'", "'.$muyear.'")';
$result = mysql_query($query) or die("Query failed: ".mysql_error().$query);
echo "<tr><td><p><strong>Added into Album table<strong></p></td></tr>:</p>:";
$query = 'SELECT AlbumID, ReleaseYear
FROM Album
WHERE (AlbumID = "'.$mualbum.'") AND (ReleaseYear = "'.$muyear.'")';
$result = mysql_query($query) or die("Query failed: ".mysql_error().$query);
__________________
http://www.good-evil.net
slap that bitch, sell her coke
raublekick is offline   Reply With Quote
Old 04-28-2005, 09:13 PM   #2
raublekick
Moderator
 
raublekick's Avatar
 

Join Date: Oct 2004
Location: Lancastuh, PA
Posts: 1,678
raublekick is an unknown quantity at this point
Send a message via AIM to raublekick
ok i'm a tool, i just had some stuff out of order.
__________________
http://www.good-evil.net
slap that bitch, sell her coke
raublekick is offline   Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright

Get Firefox! Get Thunderbird!