Date: 01/31/00
- Next message: Nathaniel Price: "Re: [PHPLIB] query inside a query"
- Previous message: Count Zero: "[PHPLIB] Cookies and PHPLIB"
- Next in thread: Nathaniel Price: "Re: [PHPLIB] query inside a query"
- Reply: Nathaniel Price: "Re: [PHPLIB] query inside a query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I need some help...
I am trying to do a query inside a query and it returns no data. It does
work without the sub query.
php 3.0.11
phplib 7.2
Example:
include( "db_mysql.inc");
class DB_MyThreads extends DB_Sql {
var $Host = "localhost";
var $Database = "sundown";
var $User = "everyone";
var $Password = "";
}
$db = new DB_MyThreads;
$db->query( "SELECT * FROM category ORDER BY 'title'");
while ($db->next_record())
{
$query_new = "SELECT * FROM category WHERE under='".$db->f(cat)."'
ORDER BY ttlinks DESC LIMIT 0,2";
$db->query($query_new);
while ($db->next_record())
{
$links_under .= $db->f(cat) . ":". $db->f(title);
}
$content .= $db->f(cat) . "|". $db->f(title). "|". $db->f(ttlinks). "|".
$db->f(info) . "|$links_under";
}
-- Joshua Curtis Production Systems Administrator Cadmus Professional Communications Science Press Division 300 West Chestnut Street Ephrata, PA 17522 717-738-9363 - voice 717-738-9416 - fax curtisj <email protected> - PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.
- Next message: Nathaniel Price: "Re: [PHPLIB] query inside a query"
- Previous message: Count Zero: "[PHPLIB] Cookies and PHPLIB"
- Next in thread: Nathaniel Price: "Re: [PHPLIB] query inside a query"
- Reply: Nathaniel Price: "Re: [PHPLIB] query inside a query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

