[ic] using $Db on more than two tables

Eduardo Dominguez interchange-users@interchange.redhat.com
Mon Oct 22 18:36:01 2001


Is it possible to query more than one table using $Db ?
I need data from two tables, and havent found out how to do so.
When I try to do a query, I just get nothing returned.
If I use a simple query like the one show later here, it works.
The sql query that doesnt work with IC is a left join that
does work if I type it directly in mysql.

On the same note, how come $results always prints "-1" ? I am
trying to print the number of rows returned

  my $query = "SELECT title, price, category, sku FROM products";

  my $dbh = $Db{products};
  my $results = $dbh->query( $query );
  $out .= "Num Results: $#results<br>";

thanks in advance


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com