Dutchyz Posted February 6, 2008 Report Share Posted February 6, 2008 kas šeit varētu būt nepareizi, ja visi tabulas dati sakrīt? <?php $dbhost = 'localhost'; $dbuser = '***'; $dbpass = '***'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = '***'; mysql_select_db($dbname); $select="products_id, products_name from products_description"; $sql_result=mysql_query($select); $rows=mysql_num_rows($sql_result); for ($n=0; $n<$rows; $n++){ $row=mysql_fetch_object($sql_result); echo $row->products_id . " || " . $row->products_name . "\n"; } ?> dabūju laukā : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in * on line 15 Link to comment Share on other sites More sharing options...
andrisp Posted February 6, 2008 Report Share Posted February 6, 2008 Nepareizs kverījs. Google: sql select select products_id, products_name from products_description Link to comment Share on other sites More sharing options...
Dutchyz Posted February 6, 2008 Author Report Share Posted February 6, 2008 (edited) Bet ko darīt ja piemēram es no a tabulas gribu a veriibu dabuut, bet no b tabulas b vertiibu? Edited February 6, 2008 by Dutchyz Link to comment Share on other sites More sharing options...
Paulinjsh Posted February 6, 2008 Report Share Posted February 6, 2008 (edited) nuļķības sarakstīju! Edited February 6, 2008 by Paulinjsh Link to comment Share on other sites More sharing options...
Aleksejs Posted February 6, 2008 Report Share Posted February 6, 2008 SELECT a AS lauks FROM a UNION SELECT b AS lauks FROM b Link to comment Share on other sites More sharing options...
Paulinjsh Posted February 6, 2008 Report Share Posted February 6, 2008 vispār palasi mysql pamatus latviski http://datubazes.wordpress.com/ vai angliski http://dev.mysql.com/ Link to comment Share on other sites More sharing options...
Recommended Posts