Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to fetch multiple rows with same category id ? #11

Open
Ebadullahamini opened this issue Apr 5, 2020 · 1 comment
Open

how to fetch multiple rows with same category id ? #11

Ebadullahamini opened this issue Apr 5, 2020 · 1 comment

Comments

@Ebadullahamini
Copy link

i have a VIEW and it joined with two tables. i want to read rows that some subject id. how can i do this?
example :
[
{
"id" : 1.
"name" : "book",
"category_id": 2
}
{
"id" : 1.
"name" : "book",
"category_id": 2
}
{
"id" : 1.
"name" : "nootbook",
"category_id": 1
}

]

i want to fetch rows with category id = 2

Please help

@MaxwellEnemuo
Copy link
Contributor

You should query your database like below :

$data = "SELECT * FROM view_name WHERE category_id = 2";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants