xunaf Posted February 1, 2016 Share Posted February 1, 2016 Sa arkadaşlar projemde mysql veritabanından tablomda 2 tane tarih sütunu var bunları ams içine çekmek istiyorum direk ams ile bağlanıp çekmeyi beceremedim kullanıcı girişi için ams >> Php >> Mysql sorgusu yaptığımız taktikte bişeyler denedim ama sonuç yine başarısız. Yardımcı olabilirseniz minnettar olurum. Projemde veritabanına bağlanıp kalan gün sayısı tarzında labele bilgi vermek istedim yada başlangıç tarihiniz ... ve bitiş tarihiniz gibi de olabilir. Mysql tablolarımda Id - isim - soyisim - mail - Bas_Tarihi - Bit_Tarihi şeklinde sütunlarım var amsden post ile gönderdiğim kodlar; sId = Label.GetText("Label1");--Label1 Kullanici Id bilgisini al sKey = Label.GetText("Label2");--Label2den isimi al result = HTTP.Submit("http://siteadim.com/altklasor/zaman.php", {sKeyGo=sKey,IdGo=sId}, SUBMITWEB_POST, 20, 80, nil, nil); if result == "Bas-Tarihi :" then Label.SetText("Label5", result) end hostumdaki php dosyasının içeriği; <?php $dbhost = "localhost"; $dbkullanici = "databaseKullaniciadi"; $dbsifre = "databaseSifrem"; $dbadi = "Databaseadim"; $baglan = mysql_connect($dbhost,$dbkullanici,$dbsifre); if(!$baglan) {die; } mysql_select_db($dbadi,$baglan) ; mysql_query("SET NAMES 'UTF8'"); mysql_query("SET character_set_connection = 'UTF8'"); mysql_query("SET character_set_client = 'UTF8'"); mysql_query("SET character_set_results = 'UTF8'"); if (isset($_POST['sKeyGo']) and isset($_POST['IdGo'])) { $kullanici = $_POST['sKeyGo']; $Idsi = $_POST['IdGo']; $sorgu = mysql_query("SELECT * FROM Tablo adim WHERE isim='$kullanici' AND ID='$Idsi'"); while ($satirlar = mysql_num_rows($sorgula)); if ($satirlar == TRUE) $basTarihi = $satirlar['Bas_Tarihi']; $bitTarihi = $satirlar['Bit_Tarihi']; { echo "Bas-Tarihi :$basTarihi"; echo"Bit-Tarihi : $bitTarihi"; } } mysql_close(); } else { echo "gonderilen bilgiler gecersiz." ; } ?> Sorgulamada ki kodlar bir yere kadar calısıyor ama ben phpden ams ye yazdırmada sıkıntı yaşıyorum sanırım daha doğrusu nasıl denediysem olmadı bıkmadan sıkılmadan günlerdir bununla uğrasıyorum sonuc = 0 php ile olmaya bilir direk ams den veritabanına bağlanarakta tarihler çekilebilir nasıl olursa öyle olsun yeterki olsun bi örnek mantık vs yardım ederseniz cok sevinirim. Şimdiden allah razı olsun tşk ederim. Quote Link to comment Share on other sites More sharing options...
LueJamesLusten Posted February 14, 2016 Share Posted February 14, 2016 You are not doing it right you are asking AMS to check for a string your not checking the string is it includes something you asking ams to check the full string. SID = Label.GetText("label1"); sKey = Label.GetText("Label2"); result = HTTP.Submit("http://siteadim.com/altklasor/zaman.php", {sKeyGo=sKey,IdGo=SID}, SUBMITWEB_POST, 20, 80, nil, nil); if String.Find(result, "Bas-Tarihi : ") ~= -1) then result = String.Replace(result, "Bas-Tarihi : ", "", false); Label.SetText("Label5", result); end Also update your php mysql is no longer a vailed means to code, use PDO or mysqli Sorry English Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.