I think you need to do a while() loop there instead of trying to grab the
results in one shot:
$row_rsRegisteredClasses = array();
while ($row = mysql_fetch_assoc($rsRegisteredClasses)) {
$row_rsRegisteredClasses[] = $row; //populate this array with the $row array
}
That may or may not work, but you have to do a while loop to fetch all of
your results from a query.
-Dash
Dare to be naive.
-- R. Buckminster Fuller
On Thu, 23 Jan 2003, Dominic wrote:
> I am running a query in a php page that is coming back with no results.
> When I run the same query in MySQL Console, it gives the results. Any
> thoughts?
>
> mysql_select_db($database_Fund, $Fund);
> $query_rsRegisteredClasses = sprintf("SELECT tlogin.FirstName,
> tlogin.LastName, tcourse.Name, tschedule.Date, tschedule.StartTime,
> tschedule.EndTime, tlogin.LoginName FROM ((tregistration INNER JOIN
> tschedule ON tregistration.ScheduleUID = tschedule.ScheduleUID) INNER JOIN
> tlogin ON tregistration.StudentUID = tlogin.LoginUID) INNER JOIN tcourse ON
> tschedule.CourseUID = tcourse.ClassID WHERE tlogin.LoginName = '%s'",
> $user_rsRegisteredClasses);
> $rsRegisteredClasses = mysql_query($query_rsRegisteredClasses, $Fund) or
> die(mysql_error());
> $row_rsRegisteredClasses = mysql_fetch_assoc($rsRegisteredClasses);
> $totalRows_rsRegisteredClasses = mysql_num_rows($rsRegisteredClasses);
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php