wierd localhost problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yshaf13
Forum Commoner
Posts: 72
Joined: Mon Apr 03, 2006 7:59 pm

wierd localhost problem

Post by yshaf13 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hi I am runnig this code to get some stuff out of the database and display it in a table. When i run it on a remote web server it works fine, however when i try to run it on localhost, it shows the first record and after that it loses all the info ("$row" is empty).
here is the code:
("Query()" is a query function that i wrote, it returns "$query1" - the resultset)

Code: Select all

$sql1="select k.*, case isnull(o.total) when 1 then 0 else o.total end total from $midk k left join (select Count(*) total, kid from $mido where points > 0 group by kid) o on k.id=o.kid";
}


query($sql1);
	while($row = mysql_fetch_array($query1))
	{
	echo '<tr><td><a href="javascript: popup(\'childform.php?act=edit&kid='.$row['id'].'\')">'.$row['last'].', '.$row['first'].'</a></td><td>'.$row['level'].'</td><td>'.$row['class'].'</td>
	<td><a href="javascript: popup(\'detkid.php?kid='.$row['id'].'&mid='.$mid.'\')">'.getkidsum($mid, $row['id']).'</a></td>
	<td>'.$row['total'].'</td>
	<td><a href="javascript: popup(\'editchomer.php?act=addc&mid='.$mid.'&kid='.$row['id'].'\')"/><img src="../img/c_edit.gif" alt="" width="16" height="16" border="0" /></a></td>
	<td><a href="javascript: popup(\'giveprize.php?kid='.$row['id'].'&mid='.$mid.'\')">Give</a></td>
	';	
	}
echo '</table>';
can anybody see why this wouldn't work?


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
yshaf13
Forum Commoner
Posts: 72
Joined: Mon Apr 03, 2006 7:59 pm

no longer only localhost

Post by yshaf13 »

hi, this just get weirder - the problem is no longer localhost, out of the blue my remote server also started having this problem! i made absolutly no changes to the code - yesterday it worked, today it doesn't! Please Help!!
yshaf13
Forum Commoner
Posts: 72
Joined: Mon Apr 03, 2006 7:59 pm

RESOLVED

Post by yshaf13 »

I figured it out.... problem with the getkidsum() function.....
Post Reply