|
|
#2 (permalink) |
|
Üyelik Tarihi: 21.08.2004
Yer: istanbul, eskişehir
Yaş: 25
Mesaj: 392
|
Re: boş field kaç tane
dediğini tam olarak anlamadım ama
, ben resim upload için aşağıdaki kodu kullanıyorum, 10 adet alandan dolu olanların içeriğini veritabanına yazdırıyorum...Kod:
for i=1 to 10
yaz=request("textbox"&(i))
if yaz<>"" then
rs.OPEN "tabloadı", alan, 1,3
rs.ADDNEW
rs("alanadı")=yaz
rs.UPDATE
rs.close
end if
next
__________________
your KEY to EUROPE : AEGEE-Eskişehir (v2.0) | REMOTTER! small remote application (beta 1.0) | MCPD adayı |
|
|
|
|
|
#3 (permalink) |
|
Üyelik Tarihi: 23.02.2008
Yer: İstanbul
Mesaj: 5
|
Re: boş field kaç tane
<%
bos = 0 set rs = server.createobject("adodb.recordset") strsql = "select * from tablo_adi" set rs = baglanti.execute(strsql) do while not rs.eof bir = rs("1") iki = rs("2") uc = rs("3") dort = rs("4") bes = rs("5") alti = rs("6") yedi = rs("7") sekiz = rs("8") dokuz = rs("9") on = rs("10") if bir = "" then bos = bos + 1 end if if iki = "" then bos = bos + 1 end if if uc = "" then bos = bos + 1 end if if dort = "" then bos = bos + 1 end if if bes = "" then bos = bos + 1 end if if alti = "" then bos = bos + 1 end if if yedi = "" then bos = bos + 1 end if if sekiz = "" then bos = bos + 1 end if if dokuz = "" then bos = bos + 1 end if if on = "" then bos = bos + 1 end if dolu = 10 - bos %> <%=rs(id)%> nolu kayıtta <%response.write(bos)%> adet boş <%response.write(dolu)%> adet dolu field bulunmaktadır. <% rs.movenext loop rs.close() set str_sql = nothing set rs = nothing %> |
|
|
|
|
|
#4 (permalink) |
|
Üyelik Tarihi: 09.12.2000
Yer: istanbul
Yaş: 30
Mesaj: 1,947
|
Re: boş field kaç tane
Kod:
<%
set rs = server.createobject("adodb.recordset")
strsql = "select id, 1, 2, 3,....,10 from tablo_adi"
set rs = baglanti.execute(strsql)
while not rs.eof
bos = 0
foreach i in rs.fields
if i.name <> "id" then
if len(i.value)<1 then bos = bos + 1
end if
next
response.write rs("id") & " id'li kayıtta "& bos &" adet kayıt boştur"
rs.movenext
wend
%>
__________________
"oturduğum mahallenin yolları çamurluydu, boyalı ayakkabı giysem bile, o yollardan geçtikten sonra çamurlanmamaları mümkün değildi. hayatım da böyle." yılmaz güney http://www.sipidik.com |
|
|
|
| Sponsorlu Bağlantılar | |
|
Zoque.Forum
Reklam
|
|
Zoque'a hoşgeldiniz!