Vladislav Gaiduk2016-01-04 01:19:22
Vladislav Gaiduk, 2016-01-04 01:19:22

500 error crashes?

Hosting is getting 500 error due to requests

$StartClass = new StartClass();

$month = date('F');
$data['UserStat'][0] = $StartClass->SqlGet('SELECT * FROM `UserStat` WHERE month =  "'.$month.'" ORDER BY id DESC LIMIT 1');
$data['UserStat'][1] = $StartClass->SqlGet('SELECT * FROM `UserStat` WHERE month =  "'.$month.'" ORDER BY id ASC LIMIT 1');

метод в классе
  public function SqlGet($query)
    return self::$mysqli->query($query)->fetch_object();

The table itself Al5fMF-M1qw.jpg
Help to find the problem

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Rikcon, 2016-01-04

And what's in the logs?

Melkij, 2016-01-04

Look in the logs for specifics.
But these particular queries have one obvious problem: dev.mysql.com/doc/refman/5.6/en/keywords.html

Vladislav Gaiduk, 2016-01-04

I wrote the name of the table with a capital letter, corrected)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question