global $pdo;
This function cannot be used with any queries that return results. This includes SELECT, OPTIMIZE TABLE, etc.
$rows = 0;
while ($res = mysql_fetch_assoc($dbProject)) {
$rows++;
// code
}
$directory = 'images/';
$files = glob($directory . '*');
$sql = '';
foreach ($files as $file) {
if(is_dir($file)) {
continue;
}
$sql .= '("' . $file . '", 3),';
}
$sql = 'INSERT INTO `people`(`name`, `deptId`) VALUES ' . substr($sql, 0, -1);
echo $sql;
надеюсь смысл понятен. SELECT * FROM `calendar` WHERE `date` BETWEEN NOW() AND DATE_ADD(NOW(),INTERVAL 6 MONTH);
SELECT * FROM tableName WHERE timestampField BETWEEN 1438383600 AND 1440975600