Re: [PHP] Re: Database Question

2003-04-04 Thread Marek Kilimajer
No, because the query specifies SELECT *, COUNT ... ^ and GROUP BY p.pilot_id Just try it José Pereira wrote: Ok, but won't this count ALL the reports and ALL the hours together??? "Marek Kilimajer" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] José Pereira wrote:

Re: [PHP] Re: Database Question

2003-04-04 Thread José Pereira
Ok, but won't this count ALL the reports and ALL the hours together??? "Marek Kilimajer" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] José Pereira wrote: >Sorry I wasn't clear before. It goes like this. > >I have a Virtual Airline and I have a DB called pilots with these t

Re: [PHP] Re: Database Question

2003-04-04 Thread Marek Kilimajer
José Pereira wrote: Sorry I wasn't clear before. It goes like this. I have a Virtual Airline and I have a DB called pilots with these tables: To make it cleaner: database has tables, tables have columns, pilots and report are tables, these are columns: pilot_id, pilot_name, ivao, vatsim, st

Re: [PHP] Re: Database Question

2003-04-03 Thread Marek Kilimajer
What is the problem? You need to be more clear about it, especially you did not tell anything about the tables, how they are related and what they contain José Pereira wrote: I Posted this and no one has helpedis this possible to get working or do I have to do it differently?? Thanks in adv

RE: [PHP] Re: database question

2001-11-29 Thread Jani Mikkonen
On Thu, 2001-11-29 at 14:59, Zozulak Peter wrote: > and what about this ... > > $sql = "SELECT a_column FROM table WHERE text_column LIKE '% $word %'; > > matching the word in the text ... > > $sql = "SELECT a_column FROM table WHERE text_column LIKE '$word %'; > > matching the word at the beg

RE: [PHP] Re: database question

2001-11-29 Thread Zozulak Peter
and what about this ... $sql = "SELECT a_column FROM table WHERE text_column LIKE '% $word %'; matching the word in the text ... $sql = "SELECT a_column FROM table WHERE text_column LIKE '$word %'; matching the word at the begining of the text ... $sql = "SELECT a_column FROM table WHERE text

Re: [PHP] Re: database question

2001-11-29 Thread Jani Mikkonen
> $word = 'bingo'; > $sql = "SELECT a_column FROM table WHERE text_column LIKE '%$word%'; > $res = mysql_query($sql); > // etc... for displaying results > > Resuming: > % on the beggining - doesn't matter what comes before > % on the end - doesn't matter what comes after Yes, which means