V
V
Vladislav Gaiduk2016-01-04 01:19:22
PHP
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)
R
Rikcon, 2016-01-04
@Rikcon

And what's in the logs?

M
Melkij, 2016-01-04
@melkij

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

V
Vladislav Gaiduk, 2016-01-04
@Danan

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