Re: [PHP-DB] can you help to beginner?

2001-08-23 Thread Chris Hobbs
I realized that as soon as I hit Send - doh! :) Jonathan Hilgeman wrote: > Actually, > He should be using three. While one company could use many services, you > might also have other companies that offer the same service. So there should > be 3 tables to allow a many-to-many relationship. See m

Re: [PHP-DB] can you help to beginner?

2001-08-23 Thread Jonathan Hilgeman
Actually, He should be using three. While one company could use many services, you might also have other companies that offer the same service. So there should be 3 tables to allow a many-to-many relationship. See my e-mail response to him. - Jonathan "Chris Hobbs" <[EMAIL PROTECTED]> wrote in m

Re: [PHP-DB] can you help to beginner?

2001-08-23 Thread Chris Hobbs
I won't add to the code suggestions already given, but I will share one thought about your tables - you absolutely _should_ be using two. Any given company can have from one service to thousands (take GE, everything from light bulbs to cruise missiles :). The only way to capture that data effe

Re: [PHP-DB] can you help to beginner?

2001-08-23 Thread Andrey Hristov
\n"; } echo "".$ar['services'].""; } } mysql_free_result($res); ?> Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: "Andrius Jakutis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 24, 2001 5:04 AM Subject: [PHP

RE: [PHP-DB] can you help to beginner?

2001-08-23 Thread BoNzO
"; print getServices($row[companyid]) . ""; print ""; } } else { print "No Companies"; } Function getServices ($id) { $sql = "SELECT services FROM services WHERE companyid = $id"; $result = mysql_query($sql); $num = mysql_num