Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP ORM¿ò¼ÜPropel VS Doctrine


ÈÏʶORMÆäʵ×îÔçÔ´×ÔÒ»³¡ÕùÂÛ£¬¸÷¸ö¿ò¼Ü¶¼Éù³Æ¾ß±¸Á¼ºÃµÄORMʵÏÖ£¬µ«ÊÇʹ
Óúó·¢ÏÖ£¬Èç¹û½ö½öÊÇÇ¿ÖÆ·µ»ØÊý¾Ý¶ÔÏó»¹Éù³Æ×Ô¼ºÊÇORMµÄ»°£¬ÄǾÍêÝЦ´ó·½ÁË¡£ÄÇÖ»ÄÜ˵ÊÇαORM»òÊÇORA£¨array£©¶øÒÑ¡£ºÜÏÔÈ»·µ»ØµÄ¶ÔÏó³ýÁË
ÊôÐÔÖµÍ⣬»¹Ó¦¸Ã°üÀ¨¿ÉÖ´Ðз½·¨£¬ÊµÏÖ¶ÔÊý¾ÝµÄ²Ù×÷ÔËÓá£
ºóÀ´¹¤×÷¸ÄÓÃsymfony
¿ò¼Ü£¬¸Ã¿ò¼ÜÄÚÖÃÁ˶ÔORM¿ò¼ÜPropel
ºÍDoctrine
µÄ
Ö§³Ö£¬symfony 1.2.*ÒÔÇ°ÊDzÉÓÃpropel×÷ΪĬÈÏORM¿ò¼Ü£¬symfony
1.3ÒÔºó¹Ù·½½«Ä¬ÈÏORM¿ò¼Ü¸ÄΪDoctrine¡£µ±È»Êµ¼ÊÔËÓÃÄã¿ÉÒÔ×ÔÓÉÇл»£¬ÄãÒ²¿ÉÒÔ²»ÓÃsymfonyÖ±½ÓÔÚ¿ª·¢ÖвÉÓÃPropel»ò
Doctrine¡£Ò»·¬PK£¬×îÖÕÔÚÏîÄ¿ÖвÉÓÃÁËDoctrine×÷ΪĬÈÏORM¿ò¼Ü¡£
ÒÔϽ«¶ÔPropelºÍDoctrineµÄÒìͬ×öÒ»¸ö¼òµ¥¶Ô±È£¬»¶Ó­ÅÄש……
»ù±¾ÌØÐÔ£º
1£©Á½ÕßÖ»Ðè¼òµ¥ÉèÖü´¿ÉÓ¦Óã¬Ö§³Ö³£ÓÃCRUD²Ù×÷£»
2£©Á½Õß¾ùÖ§³Ö×Ô¶¯Éú³Émodel£¬Ã¿¸ö±íÉú³ÉÁ½¸ömodelÎļþ£¬Ò²Ö§³Ö´ÓÔ­ÓÐÊý¾Ý¿âÉú³Émodel£»ÓÐЩÊý¾Ý¿âÊý¾ÝÀàÐÍת¹ýÀ´µÄÊôÐÔÀàÐÍ¿ÉÄܲ»ÊÇÍêÈ«Ò»Ñù£¬ÊÇÒ»¸ö×î½Ó½üµÄÀàÐÍ£»
3£©Ö§³ÖÊý¾ÝÓÐЧÑéÖ¤ºÍ¶¨Òåmodel¹Øϵ£»
4£©Ö§³Öµ¥±í¼Ì³Ð£¬Ö§³Ö×Ö¶Î×Ô¶¯¸³Öµ£»
5£©Ö§³ÖÖ÷´Ó¸´ÖÆ£»
6£©DoctrineÖ§³ÖÈ«ÎÄËÑË÷
Îĵµ£º
DoctrineµÄÎĵµÒ»Ö±¾Í±ÈPropelҪȫÃæ·á¸»£¬ÉçÇø¸ü»îÔ¾
ʹÓ÷½·¨£º
PropelºÍDoctrine»ù±¾CRUD²Ù×÷ºÜÀàËÆ£¬µ«ÊÇÉæ¼°Ìõ¼þ²Ù×÷ʱÇø±ð¾Í±È½Ï´óÁË
1£©propel²éѯ£º
$criteria
= new
Criteria(
)
;
$criteria
->add
(
JobeetJobPeer::CREATED_AT
, time
(
)
- 86400
* 30
, Criteria::GREATER_THAN
)
;
$this
->jobeet_job_list
= JobeetJobPeer::doSelect
(
$criteria
)
;
2£©doctrine²éѯ£º
$result = Doctrine_Query::create()->from("User")->where("name = 'caleng'")->excute();
Ã÷ÏÔ¿ÉÒÔ¿´³öDoctrineµÄÁ¬¹áд·¨¸ü¼Ó×ÔÈ»¡¢¸üÒ×ÔĶÁ¡¢¸ü½Ó½üÔ­ÉúSQL¡£
ÐÔÄÜ£º
Doctrine > Propel
¹Ø¼ü×Ö£ºorm¡¢symfony
¡¢doctrine
¡¢propel


Ïà¹ØÎĵµ£º

PHPÍøÒ³UTF8±àÂ뿪·¢Öпհ׵ÄÎÊÌâ

¿ª·¢ÖÐһֱû°ì·¨½â¾öµÄÒ»¸öÎÊÌâ
¡¡¡¡Ò³Ãæ²ÉÓÃUTF8±àÂ룬ͷ²¿ºÍβ²¿ÓÃÁËÄ£°å°üº¬ÎļþµÄ·½·¨£¬½á¹ûÍ·²¿ºÍβ²¿Î޶˶˸÷¶à³öÒ»¸öÔ¼10pxµÄ¿Õ
ÐУ¬Ê²Ã´Ò²Ã»ÓС£
¡¡¡¡Ô­ÒòÊÇÈ«²¿²ÉÓÃutf8±àÂ룬°üº¬ÎļþµÄʱºò£¬×îºóµÄ¶þ½øÖÆÁ÷Öаüº¬Á˶à´ÎUTF8
BOM±ê¼Ç£¬IE²»ÄÜÕý³£½âÎö°üº¬¶à¸öUTF8 BOM ±ê¼ÇµÄÒ³Ã棬ֱ½ÓÌæ»»³Éʵ¼ÊÏÔʾµÄ»Ø³ ......

phpͼƬÉÏ´«ÐĵÃ

ÔÚphpÖвâÊÔµ¥¸öÎļþÉÏ´«ºÍÔÚÍøÉÏä¯ÀÀÁ˺ܶà¹ØÓÚ¶àÎļþÉϴ棬´ó¶à¶¼ÊDz¶àÒ»ÑùµÄ¡£Ö»ÊÇÉÏ´«¶à¸öÎļþÓÃpost´«µÝʱÊÇÊý×é´«µÝ£¬Èç<input type="file" name="pic[]" id="pic">¶øµ¥¸öÎļûÉÏ´«<input type="file" name="pic" id="pic">¡£
Ìá½»Êý¾Ýʱ£¬¶à¸öÎļþÓÃforeach À´Ñ­»·£¬ÆäËûÏÞÖƺ͵¥¸öÎļþÉÏ´«¶¼ÊÇ ......

´î½¨Eclipse PHP¿ª·¢»·¾³

    ´î½¨PHP¿ª·¢»·¾³£º
    1¡¢×¼±¸²¢°²×°ÏÂÁÐÈí¼þ£º
    MySQL 5.1.30: http://dev.mysql.com/downloads/¡£
    Apache 2.2.14: http://httpd.apache.org/. ÔÚ°²×°¹ý³ÌÖÐ,»á³öÏÖ3¸öÎı¾¿ò£¬ÉÏÃæÁ½¸öÊäÈëÄãµÄ±¾»úIP£¨È磺127.0.0.1£©£¬×îÏÂÃæÊäÈëÄãµÄEMAIL ......

PHPÉÏ´«FTPºóÎÞ·¨Õý³£Ê¹Óà ³öÏ֓ŵ”

½ñÌìÕæÊǵ¹Ã¹µÄÈÕ×Ó£¬ºÁ²»ÈÝ×öºÃµÄÍøÕ¾ÉÏ´«µ½Ftp¡£¾ÓÈ»ÎÞ·¨Ê¹Óá£ÏÖÏóΪphpÒ³Ãæʲô¶¼ÏÔʾ²»³öÀ´¡£µ«ÊÇÔÚÎÒ±¾µØÈ·ÊǺúõġ£ ÄѵÀͬÑùµÄ¶«Î÷ÉÏ´«µ½FTPÉÏ»áÓÐÎÊÌâÂ𣿠¾­¹ýÎÒ½«½üÈý¸öСʱµÄµ÷²é£¬ÖÕÓڲ鴦ÁËÔ­Òò¡£ Ô­À´ һЩ utf-8¸ñʽµÄÎļþ¼ÓÁËBOM¡£Õâ¸öBOM¿É²»ÊǸöºÃ¶«Î÷¡£»á¸ãµÃ¼¸¸ö±à¼­Æ÷ Éñ»êµßµ¹µÄ¡£×îÖ±½ÓµÄ±íÏÖ¾ ......

Head First PHP MYSQL ѧϰËæ±Ê 1


1) 
°²×°Apache/2.2.14 ºÍ PHP/5.2.12 Ö®ºó£¬ÖØÐÂÆô¶¯Apache£¬Æô¶¯Ê§°Ü¡£²éÁËһЩ×ÊÁÏ£¬»ù±¾Éϸø³öµÄ½¨ÒéÊǽûµôExtension¡£ÎÒ¾Í×°ÁËÒ»¸öExtesion Mysqli¡£
ÐÞ¸Äphp.ini ×¢Ê͵ôÕâÒ»ÐУ¬¹ûÈ»ÉúЧ¡£
[PHP_MYSQLI]
;extension=php_mysqli.dll
°²×°Íêmysql£¬ÔÙÖØÐÂenableÕâ¸öÅäÖþͺÃÁË£¬¹À¼ÆÊÇÒÀÀµÄ³Ð©mysqlµÄ¿â¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ