yeahz Posted February 26, 2011 Report Share Posted February 26, 2011 $query = mysql_query("SELECT * FROM table WHERE id=$id"); kā visus datus, kas tiek izvadīti, ielikt viņus vienā arrayā? Nevis tikai vienkārši vienu rindu, bet gan visu tabulu? Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted February 26, 2011 Report Share Posted February 26, 2011 $mysql_array = array(); while($data = mysql_fetch_object($query)){ $mysql_array[] = $data; } // lai redzi, ka ir visi dati print_r($mysql_array); Quote Link to comment Share on other sites More sharing options...
yeahz Posted February 26, 2011 Author Report Share Posted February 26, 2011 tas bij ātri :D paldies. Quote Link to comment Share on other sites More sharing options...
waplet Posted February 27, 2011 Report Share Posted February 27, 2011 vai tad ir jātaisa cikls? nevar vienkārši nofečot un print_r()? Quote Link to comment Share on other sites More sharing options...
briedis Posted February 27, 2011 Report Share Posted February 27, 2011 vai tad ir jātaisa cikls? nevar vienkārši nofečot un print_r()? Nofečot var tikai vienu rindu. Un print_r ir domāts, lai izvadītu lasāmā formātā - kā stringu. 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.