;INSERT INTO your_table VALUES';
for ($i=0; $i<100; $i++)
{
if (!$first) $query .= ', ';
$query .= ' (0,1,2,3)';
$first = false;
}
mysql_query($query); // only one insert statement
Hope that helps,
Patrick Emond
- Original Message -
From: "Leif K-
Yes you can do that (that's what relational databases are all about).
To join the two tables and fetch the data you need in a single query you
would do something like this:
SELECT Book.*, Chapter.*
FROM Book, Chapter
WHERE Book.BookTitle = Chapter.BookTitle
Where "BookTitle" is whatever common
You have to fetch the row that contains the count in it. Try this:
$resource = mysql_query("SELECT COUNT(*) cnt FROM catalogs WHERE PROCESSED
IS NULL");
$countreq = mysql_fetch_array($resource);
echo $countreq[cnt];
(note as well that if no row is returned by the query then $countreq will be
se