AmfphpÓëFlex½»»¥:¶ÁÈ¡mysqlÊý¾Ý
·þÎñÆ÷¶Ë´úÂë,amfphpµÄservicesĿ¼Ï½¨Á¢readData.phpÎļþ,´úÂëÈçÏÂ
<?php
class ReadDB
{
function getData()
{
mysql_connect("localhost","root","root");
mysql_select_db("mmmm");
mysql_query("SET NAMES UTF8");
$sql="select * from mmmm";
return mysql_query($sql);
}
}
?>
flex´úÂë
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF">
<mx:RemoteObject id="myservice" fault="FaultHandler(event)" showBusyCursor="true" source="ReadDB" destination="amfphp">
<mx:method name="getData" result="ReadHandler(event)" />
</mx:RemoteObject>
<mx:Script>
<![CDATA[
import mx.managers.CursorManager;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
//×¢£º´íÎó´¦Àíº¯Êý
&nb
Ïà¹ØÎĵµ£º
ÈçÈôתÔØ£¬Çë×ðÖظöÈËÀͶ¯£¬Îñ±Ø×¢Ã÷Ôʼ³ö´¦£º(http://blog.csdn.net/iihero/archive/2010/05/13/5585039.aspx)
±¾ÎÄΪiihero@CSDNÔ´´¡£
ÔÚǰһƪ¶ÌÎÄÀïÌáµ½ÁËmy.ini/cnfµÄ¼ÓÔØ˳Ðò£ºC:\WINDOWS\my.cnf->C:\WINDOWS\my.ini->C:\my.cnf ->C:\my.ini ->$installdir\my.ini¡£(%MYSQL_HOME%\my.ini)-> ......
¡¡Ò»Ö±À§ÈÅÎÒ¿ì°ëÄêµÄÎÊÌâÖÕÓڵõ½½â¾ö, ·þÎñÆ÷µÄmysqlÀÏÊÇÔËÐÐÒ»¶Îʱ¼ä,×Ô¶¯Í£Ö¹ÁË,±ØÐëÊÖ¶¯Æô¶¯. !
¡¡¡¡ÎÒÕÒÆ«ÍøÉÏËùÓеķ½·¨,µ«Ã»ÓÐÒ»¸öÄܽâ¾ö,ʲôÐÞ¸ÄÅäÖÃÎļþ°¡.¶¨Ê±Æô¶¯.¶¼Ã»Ð§¹û. ¸ù¾Ýר¼Ò¹Û²ì£¬ÕâÑùµÄÀíÂÛºÍÏÖÏó¶¼ÊÇÖµµÃ¸÷λվ³¤Éî˼µÄ£¬ËùÒÔÏ£Íû´ó¼Ò¶à×öÑо¿Ñ§Ï°£¬ÕùÈ¡×ܽá³ö¸ü¶à¸üºÃµÄ¾Ñé!
¡¡¡¡Õâ¸ö·½·¨ÊÇÎÒ ......
·½·¨Ò»£º
ʹÓÃMySQLÍƳöµÄMySQL Connector/Net×é¼þ£¬ ¸Ã×é¼þÊÇMySQLΪADO.NET·ÃÎÊMySQLÊý¾Ý¿âÉè¼ÆµÄ.NETרÓ÷ÃÎÊ×é¼þ¡£Íê³É¸Ã×é¼þºó£¬ÐèÒªÔÚÏîÄ¿ÖÐÒýÓÃÕâ¸ö×é¼þ£¬Ò²¿ÉÒÔÖ±½ÓÔÚÅäÖÃÎļþµÄ<assemblies>½ÚµãÄÚÌí¼ÓÏÂÃæµÄ½Úµã£º
<add assembly="MySql.Data, Version=5.1.5.0, Culture=neutral, PublicKeyToken=C5687 ......
Ô¶³ÌµÇ¼ -h IPµØÖ·
ctrl + d Í˳ö »ò \q »ò quit
select version(); µ±Ç°°æ±¾
current_dateµ±Ç°ÈÕÆÚ »òcurdate() »ò current_date()
SELECT name, birth, curdate(),(year(curdate())-year(birth)) - (right(curdate(),5)<right(birth,5)) as age from ±í ORDER BY name;
year ÌáÈ¡Ä겿·Ö right(curdate(),5)ÌáÈ¡Ó ......