conan318 Posted August 9, 2011 Share Posted August 9, 2011 Should be str8 forward got it to work once then add the code to my main page and wont work now $dMonth = $_REQUEST["month"]; $dYear = $_REQUEST["year"]; $data = mysql_query("SELECT * from main.mbadmin WHERE mbadmin.month=$dMonth AND mbadmin.year=$dYear ORDER BY day DESC LIMIT 1;") or die(mysql_error()); //Puts it into an array while($info = mysql_fetch_array( $data )) { echo $info; Echo "<div class='next_ride'>"; Echo "Next Ride Updated On"; Echo "<br>"; echo $info['mk'] ; echo "<hr>"; echo "<br>"; Echo $info['nextride'] ; Echo "<br>"; Echo "<hr>"; Echo "</div>"; } Quote Link to comment https://forums.phpfreaks.com/topic/244322-wont-echo-my-query/ Share on other sites More sharing options...
TeNDoLLA Posted August 9, 2011 Share Posted August 9, 2011 So what exactly happens and what should happen instead? Any errors? Quote Link to comment https://forums.phpfreaks.com/topic/244322-wont-echo-my-query/#findComment-1254877 Share on other sites More sharing options...
Muddy_Funster Posted August 9, 2011 Share Posted August 9, 2011 you can't echo an array: echo $info; Quote Link to comment https://forums.phpfreaks.com/topic/244322-wont-echo-my-query/#findComment-1254878 Share on other sites More sharing options...
conan318 Posted August 9, 2011 Author Share Posted August 9, 2011 yup true.. but that was not the problem needed $date= $dMonth-1; all good now thanks Quote Link to comment https://forums.phpfreaks.com/topic/244322-wont-echo-my-query/#findComment-1254881 Share on other sites More sharing options...
conan318 Posted August 9, 2011 Author Share Posted August 9, 2011 wait for that was not it lol i changed the date on my computer thats why its not working lol i am a tool lol Quote Link to comment https://forums.phpfreaks.com/topic/244322-wont-echo-my-query/#findComment-1254882 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.