sql >> Databáze >  >> RDS >> Mysql

MySQL a PHP - jak zobrazit všechny řádky, kde se hodnota pole rovná x?

<?php
$con = mysql_connect("localhost","user","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("database", $con);

$result = mysql_query("SELECT Player, Team, Pass_Yds, Pass_TDs, Int_Thrown, Rush_Yds, Rush_TDs, Overall_Pts, Total_Fantasy_Pts FROM ff_projections WHERE Position = 'QB' ORDER BY Pass_Yds DESC;");

while($row = mysql_fetch_array($result))
  {
  echo $row['Player'];
  echo $row['Team'];
  ....
  }

mysql_close($con);
?>



  1. Nejčastější dotazy o JAVA/JRE v Oracle Apps

  2. LEFT JOIN vs. LEFT OUTER JOIN v SQL Server

  3. Získejte nejbližší datum z tabulky MySQL

  4. PHP - uniqid(,true) versus uniqid()+mt_rand()