About 23,752 results: "mysql_query"
Page 11 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On


  1. $sql = "SELECT SUM(tot_htva), SUM(tot_tva)FROM " . $tblpref ."bon_comm WHERE MONTH(date) = '1' AND YEAR(date) = YEAR(NOW());";
  2. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  3. $sql = " SELECT SUM(prix)FROM " . $tblpref ."`depense` WHERE MONTH(date) = 1 AND YEAR(date) = YEAR(NOW())";
  4. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  5. $sql = "SELECT SUM(tot_htva), SUM(tot_tva)FROM " . $tblpref ."bon_comm WHERE MONTH(date) = '2' AND YEAR(date) = YEAR(NOW())";
  6. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  7. $sql = " SELECT SUM(prix)FROM " . $tblpref ."`depense` WHERE MONTH(date) = 2 AND YEAR(date) = YEAR(NOW())";
  8. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  9. $sql = "SELECT SUM(tot_htva), SUM(tot_tva)FROM " . $tblpref ."bon_comm WHERE MONTH(date) = '3' AND YEAR(date) = YEAR(NOW())";
  10. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  11. $sql = " SELECT SUM(prix)FROM " . $tblpref ."`depense` WHERE MONTH(date) = 3 AND YEAR(date) = YEAR(NOW())";
  12. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  13. $sql = "SELECT SUM(tot_htva), SUM(tot_tva)FROM " . $tblpref ."bon_comm WHERE MONTH(date) = '4' AND YEAR(date) = YEAR(NOW())";
  14. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
  15. $sql = " SELECT SUM(prix)FROM " . $tblpref ."`depense` WHERE MONTH(date) = 4 AND YEAR(date) = YEAR(NOW())";
  16. $req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());


  1. 		$query = "SELECT * from dependency WHERE id =".$id.";";
  2. 		$result = mysql_query($query) or die("<b>A fatal MySQL error occured</b>.
  3. 					$query = "SELECT COUNT(*) as c from dependency_xref_sentence WHERE gov_id = ".$row['gov_id']." AND relation_id = ".$row['relation_id'].";";
  4. 					$r = mysql_query($query) or die("<b>A fatal MySQL error occured</b>.
  5. 			$query = "SELECT * from relationship WHERE id = ".$rel_id.";";
  6. 			$count = mysql_query($query) or die("<b>A fatal MySQL error occured</b>.
  7. 				$query = "SELECT id, dep_count, gov_count, frequency from dependency WHERE relation_id = ".$rel_id.";";
  8. 				$results = mysql_query($query) or die("<b>A fatal MySQL error occured</b>.
  9. 							$query = "UPDATE dependency SET information =".log(($countBoth*$countRel)/($countDep*$countGov))." WHERE id = ".$id.";" ;
  10. 							mysql_query($query) or die("<b>A fatal MySQL error occured</b>\n<br/> Query: " . $query . "\n<br/> Error: (" . mysql_errno() . ") ". mysql_error());
  11. 	$query = " SELECT * from word WHERE pos NOT IN ('X', '-LRB-', '-RRB-', '.', ',');";
  12. 	$result = mysql_query($query);
  13. 		$query = "SELECT SUM(information) as i FROM dependency where gov_id = ".$row['id']." OR dep_id = ".$row['id']." AND information > 0;";
  14. 		$r = mysql_query($query) or die("<b>A fatal MySQL error occured</b>\n<br/> Query: " . $query . "\n<br/> Error: (" . mysql_errno() . ") ". mysql_error());
  15. 		$query = "UPDATE word SET information = ".$information." WHERE id = ".$row['id'].";" or die("<b>A fatal MySQL error occured</b>\n<br/> Query: " . $query . "\n<br/> Error: (" . mysql_errno() . ") ". mysql_error());
  16. 		$r = mysql_query($query);








  1. // create temporary table playerinfo
  2. mysql_query("CREATE TEMPORARY TABLE playerinfo (player INT(10), standard FLOAT(10,2), industry FLOAT(10,2), firsts INT(10), wins INT(10), games INT(10), sort INT(1))") or die("Could not create table " . mysql_error());
  3. // create the records in playerinfo, count games played and indicate if player has real name
  4. $players = mysql_query("SELECT score.player, COUNT(score.game) AS games, player.last, player.first FROM score LEFT JOIN player ON score.player=player.id GROUP BY score.player");
  5. 	if ($player['last']) { $sort=0; } else if ($player['first']) { $sort=1; } else { $sort=2; }
  6. 	mysql_query("INSERT INTO playerinfo (player,games,firsts,wins,sort) VALUES ('$player[player]','$player[games]', '0', '0', '$sort')") or die("Could not add player " . mysql_error());
  7. // select games (to calculate standard victory points, industry victory points and first place finishes)
  8. $games = mysql_query("SELECT game.id, game.players, SUM(score.eind) AS eind FROM game LEFT JOIN score ON game.id=score.game WHERE score.win='y' GROUP BY game.id");
  9. // select scores for each game
  10. 	$scores = mysql_query("SELECT player,eind FROM score WHERE game='$game[id]' and win='y' ORDER BY eind DESC");
  11. 		if ($score[player]) {
  12. 			$playerinfos = mysql_query("SELECT * FROM playerinfo WHERE player = $score[player]") or die("couldn't select player from playerinfo " . mysql_error());
  13. 			$wins = $playerinfo['wins'] + 1;
  14. 			mysql_query("UPDATE playerinfo SET wins='$wins' WHERE player='$score[player]'") or die("Could not set wins " . mysql_error());		
  15. 	$query = "SELECT playerinfo.*, player.first, player.last, player.nick, player.id FROM playerinfo LEFT JOIN player ON playerinfo.player=player.id WHERE playerinfo.player != '0' $order;";
  16. 	$players = mysql_query($query) or die("Could not sort players by $order " . mysql_error());








Back to Top