sql >> Databasteknik >  >> RDS >> Mysql

Hur extrapolerar data av Mysql och sätts in i array?

Detta kan bero på att det saknas parentes. Slå din between villkor inom parentes

$query = "SELECT * 
FROM earthquakes 
WHERE (milliseconds BETWEEN `$ieri` AND `$oggi`)
    AND (magnitude BETWEEN `$magn_min` AND `$magn_max`)
    AND (ipocentro BETWEEN `$ipo_min` AND `$ipo_max`)
OFFSET $offset LIMIT 400";

$n_quakes = "SELECT COUNT(*)
FROM earthquakes
WHERE (milliseconds BETWEEN `$ieri` AND `$oggi`)
   AND (magnitude BETWEEN `$magn`_min AND `$magn_max`)
   AND (ipocentro BETWEEN `$ipo_min` AND `$ipo_max`)
   AND (latitude BETWEEN `$lat_inf` AND `$lat_sup`)
   AND (longitude BETWEEN `$lng_sin` AND `$lng_des`)";



  1. Reguljära uttryck inuti SQL Server

  2. Hur SHOWPLAN_XML fungerar i SQL Server

  3. Oracle Intervju frågor

  4. Ansluter till databasen Perl