Awesome q2a theme

How to bring value to all id from the table in PostgeSQL?

0 like 0 dislike
37 views
Displays the following error:

5ae9778268df1114446117.png
Here is the code:
MEATP<?php echo '<p>Connects to a PostgreSQL database:'; ?> <?php// Соединение, выбор базы данных$dbconn = pg_connect("host=pg.sweb.ru port=5432 dbname=moatpru_test user=moatpru_test password=*od***obe**anj*")or die('Could not connect: ' . pg_last_error());var_dump($dbconn);echo '<p>Execute a SQL query:'; $table= "Users"; // generate and execute a query $query = "SELECT id FROM $table"; $result = pg_query($connection, "SELECT users FROM $table") or die("Error in query: $query. ". pg_last_error($connection)); // get the number of rows in the resultset $rows = pg_num_rows($result); echo "There are currently $rows records in the database."; // close database connection pg_close($connection); ?> <?php echo '<p>FINISH'; ?>

by | 37 views

2 Answers

0 like 0 dislike
Find in the table column `id`. It is not there, there is a `id_users`.
by
0 like 0 dislike
You deleted the previous question and I have no desire to enter a response again. So I'll be brief.
One error pointed to Rsa97 , the second error:
SELECT id FROM Users; SELECT id FROM "Users";

It appeals to different tables.

Understand where have you lost yourself error messages pg.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users