Re: Warning messages on web page.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-06-23 at 15:55 +0530, Shreyas Agasthya wrote:

> Mike,
> 
> Little weird. I executed the same lines of code against my sample database
> and did not got any warning. You might want to send the code for projects
> and news to do any comparison?
> *[I will silently wait for the PHP demi-gods (the Ashleys, the Pauls et al)
> at hover their vigilant eyes on your lines .:) ]*
> 
> Regards,
> Shreyas
> 
> On Wed, Jun 23, 2010 at 2:48 PM, Mike Davies <mike@xxxxxxxxxxxxxxxxxxxxxx>wrote:
> 
> >
> > The only earlier reference to $thumbsarray is in the first lines of the
> > file :
> >
> > <?php
> > mysql_select_db($database_general, $general);
> > $query_details = "SELECT * FROM news WHERE news_id = '$_GET[id]'";
> > $details = mysql_query($query_details, $general) or die(mysql_error());
> > $row_details = mysql_fetch_assoc($details);
> > $totalRows_details = mysql_num_rows($details);
> >
> > mysql_select_db($database_general, $general);
> > $query_thumbs = "SELECT * FROM news_thumbs";
> > $thumbs = mysql_query($query_thumbs, $general) or die(mysql_error());
> > $totalRows_thumbs = mysql_num_rows($thumbs);
> > $i = 1;
> > while ($row_thumbs = mysql_fetch_assoc($thumbs)){
> > $thumbsarray[$i] = $row_thumbs;
> > $i++;
> > }
> >
> > //print_r($thumbsarray);
> > ?>
> >
> > This is exactly the same as the code which is working for the 'projects'
> > pages.
> >
> > Mike
> >
> > --
> > Mike Davies
> > Integra Web Design, Rhynie, By Huntly, AB54 4LS
> > 01464 861535            www.integrawebdesign.co.uk
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 


If you didn't get any warnings on your test machine, it might just be
because of a different error reporting being set up.

As for the local test, did it work as expected? If so, and the code
hasn't changed, then it might be the actual tables in the database. If
there are no rows returned where you expected some, and the code expects
rows as an array, then it could be the cause of the problem.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux