Vebers Posted December 2, 2005 Report Share Posted December 2, 2005 mysql_query("SELECT banneri.adrese, lietotaji.id, lietotaji.categorie FROM banneri, lietotaji WHERE lietotaji.id='$id' AND banneri.cat=lietotaji.categorie"); kaa lai izvelk no mysql bannera datus ar random "banneri.id", tjip kaa ar php funkciju rand, bet ieprieksh nav zinaams kaadi "id" ir datubazee. Link to comment Share on other sites More sharing options...
goldy Posted December 2, 2005 Report Share Posted December 2, 2005 mysql_query("SELECT banneri.adrese, lietotaji.id, lietotaji.categorie FROM banneri, lietotaji WHERE lietotaji.id='$id' AND banneri.cat=lietotaji.categorie ORDER BY RAND() LIMIT 1"); Link to comment Share on other sites More sharing options...
Vebers Posted December 2, 2005 Author Report Share Posted December 2, 2005 (edited) kops kuras mysql versijas tad RAND() darbojas ? man vinsh k-kaa negrib darboties.. visu laiku izvelk pirmo ierakstu. P.S. pashreizeeja mysql versija : 3.23.54-nt serveris nav mans! tapec jaunaku mysql ari nevaru uzlikt Edited December 2, 2005 by MakaTaNaw Link to comment Share on other sites More sharing options...
bubu Posted December 2, 2005 Report Share Posted December 2, 2005 dooh, tak, ja rand nebūtu tavā versijā, tad kļūda atgrieztos, nevis citi rezultāti. Link to comment Share on other sites More sharing options...
Recommended Posts