Jump to content

getting data from database


mahivik

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.