kts Posted December 17, 2007 Share Posted December 17, 2007 I am trying to select * from a table inside the function and then remotely display it. I know the code I have is wrong, but its what I could try to logically come up with, but I can't find any examples anywhere. If someone wouldn't mind I'd appreciate the help. Thanks a lot. function show_all_lyrics() { global $show_all_lyrics_row; $query = "SELECT * FROM lyrics ORDER BY band ASC"; $result = mysql_query($query) or die(mysql_error()); while($show_all_lyrics_row = mysql_fetch_row($result)){ } } //$row = while (show_all_lyrics()){ database_connect($host, $user, $pass, $db); show_all_lyrics(); echo $show_all_lyrics_row[3]; Quote Link to comment Share on other sites More sharing options...
kts Posted December 17, 2007 Author Share Posted December 17, 2007 aftering looking into this further, i believe i am taking an incorrect approach. instead of the code does anyone have any good sites to read up more on this topic? or possibly code/tutorial with this topic inside of it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.