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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация