RE: [PHP] Variabels in stored txt
| From: | Jay Blanchard | Date: | Tue, 31 May 2005 21:13:56 +0000 |
| Subject: | RE: [PHP] Variabels in stored txt | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-216105@lists.php.net to get a copy of this message | ||
[snip]
> [snip]
> $get_var1 = mysql_query("SELECT * FROM table1 WHERE id LIKE '1' LIMIT
> 1");
> while($record=mysql_fetch_assoc($get_var1))
> {
> $show_var = $record['text'];
> }
> [/snip]
>
> do an echo $show_var; to see what is returned right here
Allready did, no result.
[/snip]
Is your query failing? You're not doing any error checking, like this...
$myQuery = "SELECT * FROM table1 WHERE id LIKE '1' LIMIT 1 ";
if(!($myResults = mysql_query($myQuery, $myConnection))){
echo mysql_error() . "\n";
exit();
}
while($record=mysql_fetch_array($myResult)){
$show_var = $record['text'];
}
echo $show_var;