N
N
Nikita2020-06-23 19:23:32
phpstorm
Nikita, 2020-06-23 19:23:32

Why is it underlined in red?

Hello! Faced such a problem. Underlines the table name and its rows in red. Previously, everything was fine (and the code with the base functions normally) Maybe a PhpStorm glitch?

if($payload == 'volume'){
    $link = new mysqli("localhost", "логин", "пароль", "название");
    $result = mysqli_query($link, "SELECT * FROM `users` = '".$user_id."'");
    mysqli_query($link, "UPDATE `users` SET `volume` = 1 WHERE `id` = '".$user_id."'");
}

Emphasizes `users`, `id`, `volume`, plus says "Unable to resolve table 'users'"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Komarov, 2020-06-24
@Easylemon

In the IDE, in the Database section, add a connection to your database so that the storm can correctly resolve the names of the database objects. An additional advantage is to get autocomplete when writing sql queries. Well, or disable the "SQL Support" plugin, then sql will be treated as regular strings (without sql syntax highlighting).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question