• 23-11-2019, 00:27:40
    #1
    Merhaba Arkadaşlar
    Klasik ASP etiket sisteminde, etiket olarak ilanın id`sine Türkçe etiket ekliyebiliyorum, ama yapmak istediğim ilan eklerken Mysql veritabanında en-etiket, de-etiket gibi tablolar oluşturup, ilanın id`sine göre o tablolarada kendi dillerine göre etiket eklemek istiyorum, işin içinden çıkamadım, kodlamam aşağıdaki gibi, bana yardımcı olabilirmisiniz
    teşekkürler.

    <%
    Set kayit = ODBC.Execute("Insert into icerik (baslik,aciklama) values ('"&baslik&"','"&aciklama&"')")
    set kayit = nothing
    Set kontrol = ODBC.Execute("Select id from icerik where baslik = '"&baslik&"' and aciklama = '"&aciklama&"'")
    If not kontrol.eof then
    If isnull(etiket) = false then
    etiketler = split(etiket, ",")
    For i = 0 to Ubound(etiketler)
    Set etiketkayit = ODBC.Execute("Insert into etiket (yazi,etiket) values ('"&kontrol("id")&"','"&trim(etiketler(i))&"')")
    Set etiketkayit = nothing
    next
    End If
    End If
    kontrol.close : set kontrol = nothing
    response.write "Tüm bilgiler kaydedilmiştir."
    %>
  • 25-11-2019, 14:15:57
    #2
    Arkadaşlar kendim ce bu şekilde bir şey yaptım, doğrumu, yanlışmı tam olarak bilemiyorum, ücretli veya ücresit yardımcı olabilecek arkadaş varmı

    <%
    Set kayit = ODBC.Execute("Insert into icerik (baslik,aciklama) values ('"&baslik&"','"&aciklama&"')")
    set kayit = nothing
    Set kontrol = ODBC.Execute("Select id from icerik where baslik = '"&baslik&"' and aciklama = '"&aciklama&"'")
    If not kontrol.eof then

    If isnull(trtag) = false then
    etikettr = split(trtag, ",")
    For i = 0 to Ubound(etikettr)
    Set etiketkayit = ODBC.Execute("Insert into tretiket (ilanid,trtag) values ('"&kontrol("id")&"','"&trim(etikettr(i))&"')")
    Set etiketkayit = nothing
    next
    End If

    If isnull(entag) = false then
    etiketen = split(entag, ",")
    For i = 0 to Ubound(etiketen)
    Set etiketkayit = ODBC.Execute("Insert into enetiket (ilanid,entag) values ('"&kontrol("id")&"','"&trim(etiketen(i))&"')")
    Set etiketkayit = nothing
    next
    End If

    If isnull(detag) = false then
    etiketde = split(detag, ",")
    For i = 0 to Ubound(etiketde)
    Set etiketkayit = ODBC.Execute("Insert into deetiket (ilanid,detag) values ('"&kontrol("id")&"','"&trim(etiketde(i))&"')")
    Set etiketkayit = nothing
    next
    End If

    End If
    kontrol.close : set kontrol = nothing
    response.write "Tüm bilgiler kaydedilmiştir."
    %>