<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flash/Flex Developer &#187; mysql</title>
	<atom:link href="http://blog.ismailsimsek.com/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ismailsimsek.com</link>
	<description></description>
	<lastBuildDate>Thu, 22 Dec 2011 14:58:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>ezSql &#8211; işlem yapılan son id yi öğrenmek</title>
		<link>http://blog.ismailsimsek.com/php/ezsql-islem-yapilan-son-id-yi-ogrenmek.html</link>
		<comments>http://blog.ismailsimsek.com/php/ezsql-islem-yapilan-son-id-yi-ogrenmek.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 09:13:44 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[last id]]></category>
		<category><![CDATA[last insert id]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=205</guid>
		<description><![CDATA[Merhaba millet. Veritabanımıza yeni bir satır eklediğimizde sildiğimizde yada bir satırı güncellediğimizde ezSql bu satırların id lerini bizim için saklar. Örneğin yeni bir satır eklediniz ve bu eklediğiniz satırın id sini çekmeniz gerekiyor. Yani auto increment olan alandaki son girişi verecektir. ezSql ile bu bilgiye şu şekilde ulaşıyoruz. Öncelikle işlemimizi yapalım. PLAIN TEXT PHP: $db-&#62;query&#40;"insert intotablo_adi values('','birinci veri','ikinci veri...','üçüncü veri...')"&#41;; echo $db-&#62;insert_id; Hepsi bu kadar. Bunu bulabilmek için 4-5 projemin tüm kodlarını ve google ı [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba millet.</p>
<p>Veritabanımıza yeni bir satır eklediğimizde sildiğimizde yada bir satırı güncellediğimizde ezSql bu satırların id lerini bizim için saklar. Örneğin yeni bir satır eklediniz ve bu eklediğiniz satırın id sini çekmeniz gerekiyor. Yani auto increment olan alandaki son girişi verecektir.</p>
<p>ezSql ile bu bilgiye şu şekilde ulaşıyoruz.</p>
<p>Öncelikle işlemimizi yapalım.</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$db</span>-&gt;<span style="color:#006600;">query</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"insert intotablo_adi values('','birinci veri','ikinci veri...','üçüncü veri...')"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$db</span>-&gt;<span style="color:#006600;">insert_id</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Hepsi bu kadar. Bunu bulabilmek için 4-5 projemin tüm kodlarını ve google ı alt üst ettim :) Basit ama çabuk unutuluyor. Kolay gelsin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/ezsql-islem-yapilan-son-id-yi-ogrenmek.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ezSQL İle Türkçe Karakter Sorunu Nasıl Aşılır?</title>
		<link>http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html</link>
		<comments>http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html#comments</comments>
		<pubDate>Sat, 24 Jul 2010 11:19:58 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[characterset]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[türkçe karakter sorunu]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=184</guid>
		<description><![CDATA[Merhaba arkadaşlar. Uzun zaman önce tanıştığım ezSQL sayesinde pek çok işimi kolayca hallettim. Sunduğu imkanlar ve wordpress in altyapısını oluşturması benim kullanma isteğimi arttırmıştı. Öncelikle internette küçük bir araştırma yaptım. İngilizceniz varsa kendi dökümantasyonu herşeyi güzelce açıklıyor. Ama eğer türkçe kaynak isterseniz Yakuter'in ve Yakup Gövler'in blog sayfasına  göz atabilirsiniz. http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/ http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2 Ben bunları okuyup irdeleyip kendime uygun bir yapı çıkarttım. Herkesin başına gelmiştir. Php mysql ve türkçe karakter sorunu. Bu ezSQL ile de başıma [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar.</p>
<p>Uzun zaman önce tanıştığım ezSQL sayesinde pek çok işimi kolayca hallettim. Sunduğu imkanlar ve wordpress in altyapısını oluşturması benim kullanma isteğimi arttırmıştı. Öncelikle internette küçük bir araştırma yaptım. İngilizceniz varsa kendi dökümantasyonu herşeyi güzelce açıklıyor. Ama eğer türkçe kaynak isterseniz <a href="http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/" target="_blank">Yakuter</a>'in ve <a href="http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2" target="_blank">Yakup Gövler</a>'in blog sayfasına  göz atabilirsiniz.</p>
<p><a href="http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/">http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/</a></p>
<p><a href="http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2" target="_blank">http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2</a></p>
<p>Ben bunları okuyup irdeleyip kendime uygun bir yapı çıkarttım. Herkesin başına gelmiştir. Php mysql ve türkçe karakter sorunu. Bu ezSQL ile de başıma geldi. O yüzden internette araştırdım ve şöyle bir sonuca ulaştım.</p>
<p>Öncelikle ezSQL’i buradan indirip içinden <strong>mysql</strong> klasöründeki <strong>ez_sql_mysql.php</strong> ve <strong>shared</strong> klasöründeki <strong>ez_sql_core.php</strong> dosyalarını alıyoruz ve yeni kendi proje dizinimize aktarıyoruz.</p>
<p>Veritabanınızı oluştururken utf8 olarak oluşturun. Veritabanı bağlantısı yaptıktan sonra ise şu kodları yazın.</p>
<div class="igBar"><span id="lphp-7"><a href="#" onclick="javascript:showPlainTxt('php-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-7">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">"SET NAMES 'utf8'"</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">"SET CHARACTER SET utf8"</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">"SET COLLATION_CONNECTION = 'utf8_turkish_ci'"</span> <span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Bunu ezSQL ile otomatik hale getirmek için sql_for_tr.php isimli bir dosya oluşturup bunları içine yazdım. Burada dikkat edilecek nokta şudur. Dosyaların karakter kodlamaları aynı olmalı. Yani dosya ansi ile kodlanmışsa bütün dosyalar ansi olmalı. Tavsiyem ezSQL ve bu dosya için ansi kullanmanız.</p>
<p>Bunlara ek olarak birde db.php isimli bir dosyam var burada host,kullanıcı adı,şifre ve veritabanı adı gibi bağlantıda gerekli olan bilgileri tutuyorum. Onlarda şu şekildeler:</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_HOST'</span>,<span style="color:#FF0000;">'localhost'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_USER'</span>,<span style="color:#FF0000;">'root'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_PASS'</span>,<span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_NAME'</span>,<span style="color:#FF0000;">'denemeler'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Şimdi bunları nasıl kullanacağız kısmına gelelim. Yeni bir php dosyası oluşturup aşağıdaki kodları sırasıyla yazalım:</p>
<div class="igBar"><span id="lphp-9"><a href="#" onclick="javascript:showPlainTxt('php-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-9">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span> <span style="color:#FF0000;">'db.php'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span> <span style="color:#FF0000;">'ez_sql_core.php'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span> <span style="color:#FF0000;">'ez_sql_mysql.php'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$db</span> = <span style="color:#000000; font-weight:bold;">new</span> ezSQL_mysql <span style="color:#006600; font-weight:bold;">&#40;</span> DB_USER, DB_PASS, DB_NAME, DB_HOST <span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Öncelikle db dosyasını çağırdık. Sonra ezSQL dosyalarını çağırdık. Ve bağlantımızı kurduk. Dikkat ettiyseniz sql_for_tr.php doyasını çağırmadık. Bunu bizim için ezSQL kendisi yaptı. ez_sql_mysql.php dosaysının 131. satırına aşağıdaki kodu ekliyoruz.</p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span> <span style="color:#FF0000;">'sql_for_tr.php'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Bu sınıf içinde bağlantı kurulduktan hemen sonra sql_for_tr. dosyasınındaki kodların çalışmasını sağlıyor.</p>
<p>Böylelikle hem veritabanına türkçe karakter kaydedebileceğiz hem de türkçe karakterleri sayfamızda sorunsuzca gösterebileceğiz. Dikkat edilecek bir diğer husus ise şu sayfamızın karakter kodlamasının utf8 olması karakter setinin utf8 olarak ayarlanması. Bunlarda tamamsa sorunsuzca kodlamaya geçebilirsiniz demektir.</p>
<p>Dosyalara <a href="http://www.ismailsimsek.com/dosya/ezSQL.rar">şuradan</a> erişebilirsiniz.</p>
<p>Sorularınızı sormaktan çekinmeyin. İyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Flash Builder 4 ve Amfphp</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/flash-builder-4-ve-amfphp.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/flash-builder-4-ve-amfphp.html#comments</comments>
		<pubDate>Sun, 11 Apr 2010 15:04:07 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=157</guid>
		<description><![CDATA[Merhaba arkadaşlar. Bu yazımda size geçtiğimiz günlerde çıkan Flash Builder 4 ile AmfPHP ilişkisini anlatacağım. Daha önce Flex Builder ile anlatmıştım aynı konuyu ama şimdi ona bakınca ne kadar çok uğraşmışım diye kendime gülüyorum. Öncelikle basit bir veritabanı yapısı oluşturalım. Veritabanımın adı “denemeler” buraya adı “fb_ilkDeneme” isimli bir tablo oluşturuyoruz. Ve “id,isim,aciklama” alanlarını ekliyoruz. İçerisine birkaç bilgi girelim boş kalmasın. Şimdi gelelim kodlamaya. Öncelikle amfphp yi şu adresten indirip localhostumuzda uygun bir yere çıkartıyoruz. Services [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar. Bu yazımda size geçtiğimiz günlerde çıkan Flash Builder 4 ile AmfPHP ilişkisini anlatacağım. <a href="http://blog.ismailsimsek.com/amfphp/flex-ile-amfphp-kullanmak.html">Daha önce Flex Builder</a> ile anlatmıştım aynı konuyu ama şimdi ona bakınca ne kadar çok uğraşmışım diye kendime gülüyorum.<span id="more-157"></span></p>
<p>Öncelikle basit bir veritabanı yapısı oluşturalım. Veritabanımın adı “denemeler” buraya adı “fb_ilkDeneme” isimli bir tablo oluşturuyoruz. Ve “id,isim,aciklama” alanlarını ekliyoruz. İçerisine birkaç bilgi girelim boş kalmasın.</p>
<p>Şimdi gelelim kodlamaya. Öncelikle amfphp yi <a href="http://www.ismailsimsek.com/projects/amfphp.rar" target="_blank">şu adresten</a> indirip localhostumuzda uygun bir yere çıkartıyoruz. Services klasörü içerisine yeni bir klasör oluşturup adını flashbuilder olarak değiştirelim. Ben öyle yaptım siz adını farklı bir şey yapabilirisiniz. Bunu yapmamızın nedeni her yeni projenin kullandığı amfphp dosyalarının ayrı ayrı klasörlenmesi. Kısaca düzen :)</p>
<p>Sıra geldi database iletişimini sağlayacak olan sınıfımıza. Ben bunun için wordpress inde kullandığı <a href="http://www.woyano.com/jv/ezsql">ezSQL</a>’i kullanmayı tercih ediyorum. <a href="http://www.woyano.com/sites/woyano/data/assets/2/1/3/213-ez_sql_2.05.zip">Şuradan</a> indirebilir <a href="http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/">buradan</a> da yakuter’in ezSQL’i anlattığı yazısına ulaşabilirsiniz. Bu yazıyı okumuş gerekli örnek uygulamaları yapmış ve neyin ne olduğunu bildiğinizi varsayıyorum :) Daha sonra kullanımına yönelik bir makale yazacağım.</p>
<p>Oluşturduğumuz flashbuilder klasörü içine bir adet php sınıfı oluşturmamız lazım. Şimdi kodlamamıza koyulalım. Kodlar aşağıda ve açıklamalarını da hemen altlarına yazdım.</p>
<div class="igBar"><span id="lphp-13"><a href="#" onclick="javascript:showPlainTxt('php-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-13">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include_once</span> &amp;quot;ez_sql_core.php&amp;quot;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include_once</span> &amp;quot;ez_sql_mysql.php&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Bu sıraya göre include etmemiz gerekiyor yoksa hata verebiliyor.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> deneme extends ezSQL_mysql</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//sınıfımızın adı deneme.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//extends kullandım başka türlü ezSQL içindeki fonksiyonlara ulaşamıyorum</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//bunun dışında yöntem bilen varsa lütfen paylaşsın</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">function</span> deneme<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//sınıf içinde ilk çalışacak fonksiyon.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//burada benim kendi değişkenlerimi (kullanıcı adı veritabanı adı vs.) tanımladığım dosyayı çağırıyorum.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">include_once</span> &amp;quot;db.php&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$this</span>-&amp;amp;gt;ezSQL_mysql <span style="color:#006600; font-weight:bold;">&#40;</span> DB_USER, DB_PASS, DB_NAME, DB_HOST <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//son olarakta bağlantı kuruyorum.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">function</span> ilkBilgi<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$veri</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/extract"><span style="color:#000066;">extract</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$veri</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//$veri değişkenine gelen bilgileri dışarı çıkartıp her birini değişken olarak kullanmak için extract fonksiyonunu kullanıyoruz. Bu fonksiyon hakkında daha fazla bilgi için http://php.net/manual/en/function.extract.php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$bilgi</span> = <span style="color:#0000FF;">$this</span>-&amp;amp;gt;get_row<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;select * from rooms where id=&amp;quot;.<span style="color:#0000FF;">$id</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//burada id si 1 olan satırı istedim.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$bilgi</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//ve gelen bilgiyi geri gönderdim. İşte bu kadar.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Burada küçük bir açıklama yapmak istiyorum. $bilgi değişkenine gelen veri şu şekilde.<br />
(Object)#0<br />
id = "1"<br />
isim = "ismail"<br />
aciklama= "ilk aciklama satırı…."</p>
<p>Yani bize gelen veri object formatında. Buda işimizi çok kolaylaştırıyor. İstediğimiz bilgiye $bilgi-&gt;name şeklinde kolayca ulaşabiliyoruz. Bu flash builder içerisinde de işimizi çok kolaylaştıracak.<br />
Şimdi ise actionscript kodlarımıza bakalım. Sahnemizde bir adet buton bir adet textarea nesnemiz var.</p>
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-14">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=&amp;quot;<span style="color: #cc66cc;color:#800000;">1</span>.<span style="color: #cc66cc;color:#800000;">0</span>&amp;quot; encoding=&amp;quot;utf-<span style="color: #cc66cc;color:#800000;">8</span>&amp;quot;?&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;s:Application xmlns:fx=&amp;quot;http:<span style="color: #808080; font-style: italic;">//ns.adobe.com/mxml/2009&amp;quot;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; xmlns:s=&amp;quot;library:<span style="color: #808080; font-style: italic;">//ns.adobe.com/flex/spark&amp;quot;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; xmlns:mx=&amp;quot;library:<span style="color: #808080; font-style: italic;">//ns.adobe.com/flex/mx&amp;quot;&amp;gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &amp;lt;fx:Script&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> baglantiStr:<span style="color: #0066CC;">String</span>=&amp;quot;http:<span style="color: #808080; font-style: italic;">//localhost/amfphp/gateway.php&amp;quot;;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//hangi yol üzerinden iletişim kurulacak bunu belirttik.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> phpyol:<span style="color: #0066CC;">String</span>=&amp;quot;flashbuilder.<span style="color: #006600;">deneme</span>.&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//bu değişken ise services klasörü içindeki php dosyamızı belirtiyor. En sonunda bir nokta daha var. Burada oluşturduğumuz klasör içindeki fonksiyonlara ulaşmak için şu yazımı kullanıyoruz. “Flashbuilder.deneme.ilkBilgi” bu şekilde o fonksiyona ulaşıyoruz. Ama bana her seferinde “flashbuilder.deneme” yazmak zor geliyor açıkcası o yüzden böyle değişkene bağladım. </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> amfphp<span style="color: #66cc66;">&#40;</span>yol:<span style="color: #0066CC;">String</span>, veriler:<span style="color: #0066CC;">Object</span>, callback:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> baglanti:<span style="color: #0066CC;">NetConnection</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; baglanti.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span>baglantiStr<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> geri:Responder=<span style="color: #000000; font-weight: bold;">new</span> Responder<span style="color: #66cc66;">&#40;</span>callback<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; baglanti.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>phpyol + yol, geri, veriler<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> verileriGetirFnk<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> veri:<span style="color: #0066CC;">Object</span>=<span style="color: #66cc66;">&#123;</span>id: <span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amfphp<span style="color: #66cc66;">&#40;</span>&amp;quot;ilkBilgi&amp;quot;, veri, getir<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getir<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yaziAlani.<span style="color: #0066CC;">text</span>=<span style="color: #0066CC;">e</span>.<span style="color: #006600;">aciklama</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>&amp;gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &amp;lt;/fx:Script&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &amp;lt;s:TextArea x=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;y=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">width</span>=&amp;quot;<span style="color: #cc66cc;color:#800000;">497</span>&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">height</span>=&amp;quot;<span style="color: #cc66cc;color:#800000;">224</span>&amp;quot;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;id=&amp;quot;yaziAlani&amp;quot;/&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &amp;lt;s:<span style="color: #0066CC;">Button</span> x=&amp;quot;<span style="color: #cc66cc;color:#800000;">515</span>&amp;quot;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;y=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;label=&amp;quot;Verileri Getir&amp;quot;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;click=&amp;quot;verileriGetirFnk<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>&amp;quot;/&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;/s:Application&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>amfphp() fonksiyonu üç adet değişken kabul ediyor. Bunlar yol veriler ve callback. Yol değişkeni verilerimizi hangi fonksiyona göndereceğimizi belirtiyor. Veriler ise fonksiyona göndereceğimiz verileri taşıyor ve object formatında. Bu sayede php tarafında extract() ile içerisini boşaltabiliyoruz. Callback ise php den dönen verileri alıp işleyen fonksiyon. Daha sonra buraya baglanti isminde bir NetConnection nesnesi tanımlıyoruz. Bu baglanti nesnemiz ile baglantiStr de belirttiğimiz adrese bağlantıyı gerçekleştiriyoruz. Daha sonra bir Responder oluşturup callback i buraya atıyoruz. Burada dikkat edilecek nokta şu: iki farklı responder var. Biz flash.net sınıfına bağlı olanı seçiyoruz.</p>
<p><img class="alignnone" src="http://www.ismailsimsek.com/ie/flashbuilder_amfphp/1.jpg" alt="" width="477" height="244" /></p>
<p>Daha sonra bu baglanti üzerinden call() fonksiyonu ile verilerimizi gönderiyoruz. Fark ettiyseniz phpyol ile fonksiyon ismini taşıyan yol değişkenimi birleştirdim. Böylelikle daha önce yazdığım şekil ortaya çıktı. “flashbuilder.deneme.ilkBilgi”</p>
<p>verileriGetirFnk Mouse tarafından tetiklenen fonksiyonumuz. Burada veri isminde bir obje oluşturup içine göndereceğimiz veriyi düzgün şekilde yazıyoruz. Daha sonra bunu amfphp ye gönderiyoruz. Burada “ilkBilgi” php dosyasındaki fonksiyon adını veri oluşturduğumuz veri değişkenini getir ise php den dönen verilerin işleneceği fonksiyon adını belirtiyor.</p>
<p>getir fonksiyonda ise dönen verimizi istediğimiz şekilde kullanabiliriz. Çünkü buraya gelen veri object şeklinde zaten. Kullanımı çok basit. Textarea ya yazdıracağımız veriyi e.aciklama şeklinde tanımlıyoruz. Hepsi bu kadar. Veritabanından veriyi çektik ve yazdırdık.</p>
<p>Veritabanına veri kaydı için ise kaydedeceğimiz verileri gönderiyoruz php ile kayıt işlemini yapıyoruz. Bu kadar basit. Diğerinden daha kolay değil mi?</p>
<p>Herkese iyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/flash-builder-4-ve-amfphp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actionscript 3.0 &#8211; Php &#8211; MySql veri alışverişi</title>
		<link>http://blog.ismailsimsek.com/php/actionscript-3-0-php-mysql-veri-alisverisi.html</link>
		<comments>http://blog.ismailsimsek.com/php/actionscript-3-0-php-mysql-veri-alisverisi.html#comments</comments>
		<pubDate>Fri, 09 Apr 2010 20:32:32 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[actionscript php iletişimi]]></category>
		<category><![CDATA[as3.0]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sqlyog]]></category>
		<category><![CDATA[veritabanı]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=150</guid>
		<description><![CDATA[Merhaba arkadaşlar. Bu yazımda Actionscript 3.0 ve php ile veritabanından veri çekmeyi, veritabanına veri göndermeyi anlatacağım. Tabi bunu çok basit düzeyde ve amatörce anlatacağım. Bu şekilde anlatacağım çünkü öncelikle bu kullanımı bilmeliyiz. Daha sonra veri alışverişleri için daha farklı yöntemler sınıflar araçlar kullanabiliriz. Şimdi anlatıma başlayalım. Bu örneği bir soru için hazırlamıştım. Aranılan kişinin puanını ekranda gösteren bir uygulama. Öncelikle aşağıdaki gibi bir sahne oluşturalım. Burada ilk text kutusunun instance name’i “aramaTxt” butonunkisi “veriGetirBtn” alttaki [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar. Bu yazımda Actionscript 3.0 ve php ile veritabanından veri çekmeyi, veritabanına veri göndermeyi anlatacağım. Tabi bunu çok basit düzeyde ve amatörce anlatacağım. Bu şekilde anlatacağım çünkü öncelikle bu kullanımı bilmeliyiz. Daha sonra veri alışverişleri için daha farklı yöntemler sınıflar araçlar kullanabiliriz.</p>
<p>Şimdi anlatıma başlayalım.</p>
<p><span id="more-150"></span>Bu örneği bir soru için hazırlamıştım. Aranılan kişinin puanını ekranda gösteren bir uygulama.</p>
<p>Öncelikle aşağıdaki gibi bir sahne oluşturalım.</p>
<p><img class="alignnone" src="http://www.ismailsimsek.com/ie/asphpiletisim/1.jpg" alt="" width="544" height="200" /><br />
Burada ilk text kutusunun instance name’i “aramaTxt” butonunkisi “veriGetirBtn” alttaki textarea’nınki ise “sonucTxt”.<br />
Bu işlemden sonra veritabanını oluşturalım. Veritabanı işlemleri için sqlyog programını kullanıyorum. Phpmyadmin den çok daha kullanışlı ve pratik. <a href="http://www.webyog.com/en/" target="_blank">Şu adresten</a> kendisine ulaşabilirsiniz.</p>
<p><img class="alignnone" src="http://www.ismailsimsek.com/ie/asphpiletisim/2.jpg" alt="" width="348" height="193" /></p>
<p><img class="alignnone" src="http://www.ismailsimsek.com/ie/asphpiletisim/3.jpg" alt="" width="808" height="161" /></p>
<p>Tablomuzun ismi puantaj. Ve son görüntüsü şu şekilde:</p>
<p><img class="alignnone" src="http://www.ismailsimsek.com/ie/asphpiletisim/4.jpg" alt="" /></p>
<p>Şimdide flash içinde kodlamaya başlayalım. Kodlarımızı satır satır açıklayacağım.</p>
<div class="igBar"><span id="lactionscript-17"><a href="#" onclick="javascript:showPlainTxt('actionscript-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-17">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> yol:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">"http://localhost/veriCek.php"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//nereden veri çekileceğini belirttik. siz isteğinize göre değiştirebilirsiniz bu yolu...</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">kisileriGetir<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> kisileriGetir<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> adres:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>yol<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//önceden belirlediğimiz yoldaki php dosyasına istek göndermak için adres isimli bir URLRequest nesnesi tanımladık.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> veriler:URLVariables = <span style="color: #000000; font-weight: bold;">new</span> URLVariables<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//göndereceğimiz veriyi taşıması için bir URLVariables değişkeni tanımladık.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">veriler.<span style="color: #006600;">islem</span> = <span style="color: #ff0000;">"hepsi"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//yapılacak işlemi seçmek için birde islem isimli değişken oluşturduk.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">adres.<span style="color: #006600;">method</span> = URLRequestMethod.<span style="color: #006600;">POST</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//URLRequest nesnemizin hangi yolla verileri göndereceğini belirledik.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">adres.<span style="color: #0066CC;">data</span> = veriler;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//URLRequest nesnemize verilerimizi ekledik.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sendToURL<span style="color: #66cc66;">&#40;</span>adres<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//ve son olarak gönderdik.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> yukle:URLLoader = <span style="color: #000000; font-weight: bold;">new</span> URLLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//yukle isimli URLLoader nesnemizi tanımladık. bunla php den dönen verileri alıcaz.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yukle.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>adres<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yukle.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, yuklendi<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//yukle isimli URLLoader nesnemiz verileri yüklediğinde yuklendi fonksiyonu çalışacak.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">veriGetirBtn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,veriGetirFnk<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//butona click olayı sonucunda çalıştıracağı fonksiyonu atadık.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> veriGetirFnk<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> adres:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>yol<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> veriler:URLVariables = <span style="color: #000000; font-weight: bold;">new</span> URLVariables<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">veriler.<span style="color: #006600;">aranan_isim</span> = aramaTxt.<span style="color: #0066CC;">text</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">veriler.<span style="color: #006600;">islem</span> = <span style="color: #ff0000;">"tektek"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">adres.<span style="color: #006600;">method</span> = URLRequestMethod.<span style="color: #006600;">POST</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">adres.<span style="color: #0066CC;">data</span> = veriler;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sendToURL<span style="color: #66cc66;">&#40;</span>adres<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> yukle:URLLoader = <span style="color: #000000; font-weight: bold;">new</span> URLLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yukle.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>adres<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yukle.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, yuklendi<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> yuklendi<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sonucTxt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//sonucların yazılacağı metin alanını temizledik.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> gelenler:URLVariables = <span style="color: #000000; font-weight: bold;">new</span> URLVariables<span style="color: #66cc66;">&#40;</span>URLLoader<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//gelen verileri almak için URLVariables değişkeni tanımladık ve yüklenen veriyi uygun şekilde ona aktardık.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>gelenler.<span style="color: #006600;">sonuc</span> == <span style="color: #ff0000;">"yok"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span><span style="color: #808080; font-style: italic;">// eğer gelen bişey yok ise kayıt yok diyecek.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sonucTxt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"Böyle bir kayıt yok."</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span><span style="color: #808080; font-style: italic;">//varsa uygun şekeilde yazacak.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sonucTxt.<span style="color: #0066CC;">htmlText</span> = gelenler.<span style="color: #006600;">sonuc</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">aramaTxt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Tüm açıklamaları yukarıda tek tek yazdım. Şimdi php kısmına bir göz atalım. Yukarıdaki veriler objesinde taşınan verilerimiz bizim için çok değerli. Phpde ona uygun şekilde çekmemiz gerekiyor. Şimdi php kodlarını gene açıklamalı olarak yazalım.</p>
<div class="igBar"><span id="lphp-18"><a href="#" onclick="javascript:showPlainTxt('php-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$baglanti</span> = <a href="http://www.php.net/mysql_connect"><span style="color:#000066;">mysql_connect</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"localhost"</span>,<span style="color:#FF0000;">"root"</span>,<span style="color:#FF0000;">""</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_select_db"><span style="color:#000066;">mysql_select_db</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"asphpiletisim"</span>, <span style="color:#0000FF;">$baglanti</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Veritabanı bağlantısını kurduk.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$islem</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'islem'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//flash içinden gönderilen veriyi çektik.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$islem</span>==<span style="color:#FF0000;">"tektek"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$isim</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'aranan_isim'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sorgu</span> = <a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"select * from puantaj where isim='$isim'"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$gelen</span> = <a href="http://www.php.net/mysql_fetch_assoc"><span style="color:#000066;">mysql_fetch_assoc</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sorgu</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//bu veriyi veritabanından sorgulattık.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$gelen</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#FF9933; font-style:italic;">//dönen bir veri var ise</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"sonuc="</span>.<span style="color:#0000FF;">$isim</span>.<span style="color:#FF0000;">"-&amp;amp;gt;"</span>.<span style="color:#0000FF;">$gelen</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'puan'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//sonuc=100 şeklinde yazdırdık.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//flash içinde de gelen verileri gelenler.sonuc şeklinde çekmiştik. buradan ona uygun şekilde gönderdik çünkü.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">else</span><span style="color:#FF9933; font-style:italic;">//herhangi bir kayıt yoksa</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"sonuc=yok"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">elseif</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$islem</span>==<span style="color:#FF0000;">"hepsi"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sorgu</span> = <a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"select * from puantaj"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sonuclar</span>=<span style="color:#FF0000;">"sonuc="</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$gelen</span> = <a href="http://www.php.net/mysql_fetch_assoc"><span style="color:#000066;">mysql_fetch_assoc</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sorgu</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sonuclar</span> .= <span style="color:#0000FF;">$gelen</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'isim'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">"-&amp;amp;gt;"</span>.<span style="color:#0000FF;">$gelen</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'puan'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">"&amp;amp;lt;br /&amp;amp;gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//her bir satırdaki veriyi altalta gelecek şekilde bir değişkene attık.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$sonuclar</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//daha sonra bunları ekrana yazdırdık.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Php dosyamızda bu şekilde gene açıklamaları direkt olarak altlarına yazdım. Bu işlemler sonucunda arama ve ekrana yazdırma işlemlerini yapabiliyoruz. Olay bundan ibaret ama sizinde gördüğünüz gibi çok karışık. Bunun yerine bir veritabanı sınıfı yada aracı kullanmanız zamanınızı kısaltacak size saç baş yoldurtmayacaktır :) Bu yöntemde bir yerde hata çıkması demek hatayı bulana kadar sinir olmak demektir :)</p>
<p>Bu çalışmanın tüm dosyalarını <a href="http://www.ismailsimsek.com/ie/asphpiletisim/as3_php_iletisim.rar">şuradan</a> indirebilirsiniz.</p>
<p>Kolay gelsin. Takıldığınız noktalarda soru sormaktan çekinmeyin…</p>
<p>( Not: Yakın bir zamanda bu konuyla ilgili daha anlaşılır ve daha zengin içeriğe sahip bir makale yayınlayacağım. )<br />
( Not2: Bu konu ile ilgili daha basit ve anlaşılır olan makalem şurada: <a title="Php – AS3 veri iletişimi [Actionscript PhpData Class]" href="http://blog.ismailsimsek.com/php/php-%E2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html" target="_blank">Php – AS3 veri iletişimi [Actionscript PhpData Class]</a> )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/actionscript-3-0-php-mysql-veri-alisverisi.html/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>

