查询未完全显示 [英] Query not fully showing
本文介绍了查询未完全显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要从数据库中获取的查询未完全显示。
关于 $ straat 查询。所有其他查询都很好。
The Query I want to get from my database is not fully showing. Its about the $straat query. All the other queries are perfectly fine.
问题描述:
这是正常的结果主页
在Straat& Huisnummer显示了 Roelofs Mulderweg 3
At Straat & Huisnummer its showing "Roelofs Mulderweg 3"
这是我尝试使用脚本对其进行编辑的问题
如您在Straat& Huisnummer查询不再完全显示。
As you can see at Straat & Huisnummer the query is not fully showing anymore.
PHP $ b / b
THE PHP
//selecting data associated with this particular id
$result = mysql_query("SELECT * FROM tt WHERE id=$id");
while($res = mysql_fetch_array($result))
{
$track = $res['track'];
$straat = $res['straat'];
$postcode = $res['postcode'];
$plaats = $res['plaats'];
$land = $res['land'];
$datum = $res['datum'];
$klantnummer = $res['klantnummer'];
}
?>
HTML
The HTML
<tr bgcolor='#CCCCCC'>
<td>Track & Trace</td>
<td>Straat & Huisnummer</td>
<td>Postcode</td>
<td>Plaats</td>
<td>Land</td>
<td>Datum</td>
<td>Klantnummer</td>
</tr>
<tr>
<td><input type="text" style="width:100%" name="track" value=<?php echo $track;?>></td>
<td><input type="text" style="width:100%" name="straat" value=<?php echo $straat;?>></td>
<td><input type="text" style="width:100%" name="postcode" value=<?php echo $postcode;?>></td>
<td><input type="text" style="width:100%" name="plaats" value=<?php echo $plaats;?>></td>
<td><input type="text" style="width:100%" name="land" value=<?php echo $land;?>></td>
<td><input type="text" style="width:100%" name="datum" value=<?php echo $datum;?>></td>
<td><input type="text" style="width:100%" name="klantnummer" value=<?php echo $klantnummer;?>></td>
<td><input type="hidden" name="id" value=<?php echo $_GET['id'];?>></td>
</tr>
</table>
<input type="submit" name="update" value="Update">
</form>
推荐答案
如注释中所建议:
value=<?php echo $straat;?>>
由于值中的空白而中断。
breaks due to the whitespace in the value. Replacing this line with
value="<?php echo $straat;?>">
(注意使用连字符)可以解决此问题。
(note the hyphens) solves the issue.
这篇关于查询未完全显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文