For some reason, they stopped passing requests to the database. All requests are normal, but last night something became blunt. And the request goes in the file, where there are a lot of such requests, but for some reason this does not work. And apparently, only with 1 table like this!

$res_list_reads = mysql_query("SELECT iread FROM reads WHERE myid = '$_SESSION[usre_id]'",$db); $row_list_reads = mysql_fetch_array($res_list_reads); 

    1 answer 1

    $ _SESSION is an associative array:

     $res_list_reads = mesql_query("SELECT iread FROM reads WHERE myid = '{$_SESSION['user_id']}'", $db); $row_list_reads = mysql_fetch_array($res_list_reads); 

    Or so:

     $res_list_reads = mesql_query("SELECT iread FROM reads WHERE myid = '" . $_SESSION['user_id'] . "'", $db); 
    • no ... it turned out that the name of the table had to be written in the имя_базы_данных . table_name - Lgunchik
    • well, if before that you did not do mysql_select_db (), then this is by itself. - Shamanis