Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Ams Ile Mysql Tarih Çekme


xunaf
 Share

Recommended Posts

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.

 

 

 

Link to comment
Share on other sites

  • 2 hafta sonra ...

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.
 

 

  1. SID = Label.GetText("label1");
  2. sKey = Label.GetText("Label2");
  3. result = HTTP.Submit("http://siteadim.com/altklasor/zaman.php", {sKeyGo=sKey,IdGo=SID}, SUBMITWEB_POST, 20, 80, nil, nil);
  4. if String.Find(result, "Bas-Tarihi : ") ~= -1) then
  5. result = String.Replace(result, "Bas-Tarihi : ", "", false);
  6. Label.SetText("Label5", result);
  7. end

 

 

Also update your php mysql is no longer a vailed means to code, use PDO or mysqli

 

 

Sorry English

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...