You are here: Re: query ok but no parsing ? « All PHP « IT news, forums, messages
Re: query ok but no parsing ?

Posted by Veikko M�kinen on 06/17/05 18:12

J.O. Aho wrote:
> The Legend wrote:
>
>> -----
>> <tr>
>> <tr bgcolor="<?php echo"$tabletop"; ?>">
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.soort]</b>"; ?></td>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.titel]</b>"; ?></td>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.naam]</b>"; ?></td>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.bedrijfsnaam]</b>"; ?>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.plaats]</b>"; ?>
>> </td>
>>
>> </tr>
>> ----
>
>
> $resultat[m.soort] isn't the fetched rows m.sort, but an undefined enum
> value, which results in a cell in the $resultat that is not there.

Wrong.

m.soort is not an undefined enum, but is treated as a constant. Luckily
PHP assumes the coder just forgot to write quotes if such a constant is
not found.

$ cat test.php
<?php
error_reporting(E_ALL|E_STRICT);
$a['a']= 'foo';
$b = $a[a];
?>

$ php test.php
Notice: Use of undefined constant a - assumed 'a' in /xxx/test.php on line 4


-veikko

--
veikko
mail@ .com
makinen

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация