You are here: Re: [PHP] performance suggestions « PHP « IT news, forums, messages
Re: [PHP] performance suggestions

Posted by "Joe Belmaati" on 11/13/05 11:56

$sql = "SELECT u.*, s.*, p.*
FROM URL u, session s, page p
WHERE u.url_id = s.url_id
AND s.section_id = p.section";
if (!$result = mysql_query($sql))
{
die('Could not obtain results');
}

while ($row = mysql_fetch_array($result))
{
$url = $row['url_name'];
..........
..........
and what ever else you want to do here;
}


"James Benson" <jb@jamesbenson.co.uk> wrote in message
news:37.4E.05064.5B571734@pb1.pair.com...
> Thanks
>
>
>
>
> Richard Lynch wrote:
> > On Thu, November 3, 2005 8:29 am, James Benson wrote:
> >
> >>Dear group, can someone suggest the best way to do the following
> >>without
> >>writing some lengthy script that (possibly) could lead to performance
> >>issues,
> >>
> >>
> >>I have three DB fields in MySQL, each has a unique ID, I cannot think
> >>of
> >>any ways other than pulling each tables record then looping through to
> >>determine which one each belongs to which group then maybe placing
> >>into
> >>an array,
> >>the association between them all goes like this,
> >>
> >>
> >>URL:-
> >>url_id
> >>url_name
> >>
> >>section:-
> >>section_id
> >>url_id
> >>section_name
> >>
> >>page:-
> >>page_id
> >>section_id
> >>page_name
> >
> >
> > http://info.com/mysql+join
> >

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация