回声除了数据库中的内容 [英] echo out something else than what is in the database
问题描述
你好
i有一些PHP代码,我把数据库中的东西回显到表中。
我需要的是一些php代码显示我从数据库中得到的东西。
这是一个例子:
我回应了这样一个字段:
[PHP]<?php
$ sql =" SELECT * FROM QHEADER WHERE [QuoteID] =''" 。 $ QuoteToFind。 "" ; $ / b $ $ $ $ $ $ $ $ $ $ $ $ $ $
$ RJustQuoteToFind = ads_result($ qheader," Quote Nbr");
echo"< td bgcolor =''#EFEFEF''align =''left''valign = ''top''class =''boldtext''style =''border-style:none; padding-top:3px;''>" 。 ads_result($ qheader," VGrove")。 "< / td>";
}
?> [/ PHP]
现在这个字段显示在表格中:Y
我需要它显示的是: 是
是否可以执行以下操作:
如果FieldTocheck =''Y',则FieldToPrint =" Yes" ;
欢迎任何输入............. ?????
< blockquote> sql =" SELECT * FROM QHEADER WHERE [QuoteID] =''" 。
QuoteToFind。 "" ;
qheader = ads_exec(
Hello
i have some php code where i echo out somethings from a database into a table.
What i need is some php code to show something else than what i am getting from the database.
Here is an example:
I echo out a field like this:
[PHP]<?php
$sql = "SELECT * FROM QHEADER WHERE [QuoteID] = ''" . $QuoteToFind . "''" ;
$qheader = ads_exec($conn,$sql);
while (ads_fetch_row($qheader))
{
$RJustQuoteToFind = ads_result($qheader,"Quote Nbr");
echo "<td bgcolor=''#EFEFEF'' align=''left'' valign=''top'' class=''boldtext'' style=''border-style: none; padding-top: 3px;''>" . ads_result($qheader,"VGrove") . "</td>";
}
?> [/PHP]
Now this field shows up in the table as: "Y"
What i need it to show is: "Yes"
Is it possible to do something like:
if FieldTocheck = ''Y'' then FieldToPrint = "Yes"
Any input is welcome.............?????
sql = "SELECT * FROM QHEADER WHERE [QuoteID] = ''" .
QuoteToFind . "''" ;
qheader = ads_exec(
这篇关于回声除了数据库中的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!