Skip to content

Tag: mysql

Combine Two Queries into One?

I have a MySQL query that selects all audioids from a certain user in a subscribe table. I then have another query which takes this list of audioids and matches them against a field called opids in a table called audioposts. It then selects the titles from that audioposts table and joins the users from a user…

Get average of average columns in mysql

I am having a table that stores ratings of a restaurant. As shown in the below image. I am trying to get the average of all these columns in which I am being successful but I also want an average of all these averages as a main average. I tried the below query but I am getting 3 as average

PHP MysqlI – How to Select 1 Row? (from select)

I am a bit stumped on how i should be able to Define 1 post ID, and only select from that row my query: my end goal is to get all from row 3 (only row 3), not get all rows. when i run the query above, i get every row from mysql. example: returns with all rows, what i