Home>
I want to take data from the table I write this code
$ conn= new mysqli ($ dbhost, $ dbuser, $ dbpass, $ dbname);
$ data= array ();
$ sql= "SELECT` pipelines_name`, `pipelines_id` FROM` fixhub_pipelines` WHERE 1 ";
while ($ row= mysqli_fetch_assoc ($ ta)) {
$ data []= $ row;
}
echo json_encode ($ data);
? >
At the output I get
[]
What's wrong?
look at least the comments -php.net/manual/ru/mysqli-result.fetch-array.php
splash582021-12-10 09:27:31Related questions
- php : "Data truncated for column 'password' at row 1"
- php : Authorization bug does not work correctly
- php : How to deduce from largest to smallest from SQL in data type text
- php : MySQL returned an empty result (i.e. zero rows). (The request took 0.0000 seconds.)
- php : mysqli_real_escape_string oop Need help with syntax
- php : How to update columns in a database table in an already created record?
- javascript : How to save the history of previous user logins in the database
- php : Endless while loop when called from the database
- php : Form data is not being entered into MySql database
What's wrong? Between the formation of the query string and the output of the result, there should be, as it were, the execution of the query ...
Akina2021-12-10 08:35:42