[PHP] Re: Database question

2003-07-03 Thread Pete Morganic
definately do NOT recommend this path- Just make an include file at the top of each page pete Hardik Doshi wrote: Hi Group, Currently i am connecting the underlying database server from every php page. To reduce the connection overhead i am thinking to store the PEAR DB object into the registry

[PHP] Re: Database Question

2003-04-04 Thread José Pereira
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: pilot_id, pilot_name, ivao, vatsim, status Also have a report DB which contains these tables: pilot_id, pilot_name, aircraft, flight_time, origin, destination,

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,

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 tables:

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:

[PHP] Re: Database Question

2003-04-03 Thread José Pereira
I Posted this and no one has helpedis this possible to get working or do I have to do it differently?? Thanks in advance José Pereira [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hi all, I'm trying to grab information from two DBs one being a mamber db and the other a

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

[PHP] Re: database question

2001-11-29 Thread Julio Nobrega Trabalhando
$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 -- Julio Nobrega No matter where

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

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 begining of