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
Ïà¹ØÎĵµ£º
Òý×Ó£º×÷ÓÚÒ»ÃûÓÉASP.NET¿ª·¢×ªµ½Flex¿ª·¢µÄ³ÌÐòÔ±£¬×ʼÊÊÓ¦µÄ¹ý³ÌÊÇÏ൱ÓäÔúÍÇáËɵġ£ÓÉÓÚÎÒÔçÔÚASP.NETÖÐϰ¹ßÁ˱êǩʽµÄ²¼¾ÖºÍ¶ÔÓ¦µÄcode behindµÄ±à³Ì·½Ê½£¬ÔÚFlexÖеÄMXMLÓïÑÔÖ»²»¹ýÊÇMXMLÔªËØºÍAS3Óï·¨µÄÖØÐÂÊìϤ¡£µ«ÊǾÍÏñASP.NETÖеıê¼ÇÓïÑÔ£¬MXMLÖ»²»¹ýÊÇAS3µÄÒ»ÖÖ·â×°£¬¹é¸ùµ½µ×Ëü»á±»×ª»¯³ÉAS3ÔÙ½øÐбàÒë£¬Ë ......
¶ÔÓÚÿ¸öÀàÐÍÓµÓеÄÖµ·¶Î§ÒÔ¼°²¢ÇÒÖ¸¶¨ÈÕÆÚºÎʱ¼äÖµµÄÓÐЧ¸ñʽµÄÃèÊö¼û7.3.6 ÈÕÆÚºÍʱ¼äÀàÐÍ¡£
ÕâÀïÊÇÒ»¸öʹÓÃÈÕÆÚº¯ÊýµÄÀý×Ó¡£ÏÂÃæµÄ²éѯѡÔñÁËËùÓмǼ£¬Æädate_colµÄÖµÊÇÔÚ×îºó30ÌìÒÔÄÚ£º
mysql> SELECT something from table
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) select DAYOFWEEK('1998-02-03');
-&g ......
Ö÷´Ó·þÎñÆ÷±íÀàÐ͵ÄÑ¡Ôñ
Ò»°ãµÄ¹²Ê¶ÊÇÖ÷·þÎñÆ÷ʹÓÃinnodb£¬ÊÂÎñ£¬ÐÐËøµÈ¹¦ÄÜÊÇmyisamËùûÓе쬶ÔÐ޸IJÙ×÷¶øÑÔ£¬Ëü¸ü¸ßЧ£»´Ó·þÎñÆ÷ʹÓÃmyisam£¬È«ÎļìË÷¹¦ÄÜÊÇinnodbËùûÓеģ¬¶Ô²éѯ²Ù×÷¶øÑÔ£¬Ëü¸ü¸ßЧ¡£ÕâÑù¾Í¿ÉÒÔ¸÷¾¡ÆäÄÜ¡£
ºÇºÇ£¬Ö÷´Ó¿â¸÷˾ÆäÖ°£¬Ö÷¿â£º×î¿ìµÄËÙ¶È×öÌí¼Óɾ³ýÐ޸IJÙ×÷£¬´Ó¿â£¬×î¿ìµÄËÙ¶È×ö²éѯ²Ù×÷
......
MySQL error 2003µÄ½â¾ö¹ý³Ì¸Õ²ÅÂÛ̳³öÏÖ:
error 2003:Can't connect to MySQL server on ..............
ÎÊÌâ:MYSQLÊý¾Ý¿âûÓÐÆô¶¯~
½â¾ö:°Ù¶ÈÁËÒ»ÏÂ,˵µÄ½â¾ö·½·¨¸÷ÖÖ¸÷Ñù,ºÜ¶à.
1\ÔÚ“ÔËÐДÀïÕÒµ½C:\mysql\bin\mysqld-opt.exe ÔËÐоÍÊÇÁË£¡ÕÒÁË,ûÓÐÕâ¸ö¶«Î÷:(
2 ÔÚDosÏÂ cd \mysql ......
Ô¶³ÌµÇ¼ -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)ÌáÈ¡Ó ......