Hello, there was a big problem, but I do not want to waste your time and describe the problem only at this stage:
There is one function and in it the var_dump result of the SQL conversion => Array. The fact is that I need only a specific entry in the database, but it does not work to get it. Tried with while - the result is also nothing, just displays nothing purely. Also tried var_dump with while but without specifying a specific cell.
Here is the current function code (with while):
function Redirect($user_id,$sql_connection){ $sql_query = "SELECT * FROM `links` WHERE `owner_id` = ".$user_id." "; $sql_response = mysql_query($sql_query); while ($row = mysql_fetch_assoc($sql_response)){ var_dump($row); } }
I tried this without while:
function Redirect($user_id,$sql_connection){ $sql_query = "SELECT * FROM `links` WHERE `owner_id` = ".$user_id." "; $sql_response = mysql_query($sql_query); $row = mysql_fetch_assoc($sql_response); // в этом коде убран только while! var_dump($row); }
Here is a working version, but it displays all the records, but I need only one:
function Redirect($user_id,$sql_connection){ $sql_query = "SELECT * FROM `links`"; // убран поиск записи по WHERE $sql_response = mysql_query($sql_query); while ($row = mysql_fetch_assoc($sql_response)){ var_dump($row); } }
I think the problem is in the little things, but now it doesn’t work out at all, but the problem is big.