Jump to content

Recommended Posts

Hi all,

 

I am Mahivik and I am starting work in php in my work I am facing a new problem plase tell me if anyone can do my help.

 

I have a database table with filed id, color, fruits,  status, in which id is auto increment and primary and i have data in the format.

 

-----|----------------|------------------|----------------|

id    |color----------| fruits----------|status--------|

1    | yellow ------| banana        |  0                |

2    | yellow        | mango          | 0                |

3    | green        | watermalen  | 0                |

4    | green        | grapes          | 0                |

5    | yellow        | pineapple      | 0                |

 

-----------------------------------------------------------

 

from this table I have to search fruits name by color but not color group by i.e.

 

select * from fruits group by color, i don't want this. I want result 3 yellow and 2 green. only.

 

Link to comment
https://forums.phpfreaks.com/topic/217431-getting-data-from-database/
Share on other sites

my boss says that, if we make two query then this will make our site slow. actually I make a model of my query I don't want result from this 5 records but I want something more from this. we have around 7000 users list in which we have to select numbers of one type of users.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.