×ðÁú¿­Ê±

ThinkPHPÖÐÔõô¾ÙÐÐÊý¾ÝÅÌÎʺóÌí¼Ó×Ö¶Î

Ò»¡¢ÅÌÎÊÊý¾Ý

ÎÒÃÇÏÈÍù·µÊ×Ò»ÏÂÔõÑùÔÚThinkPHPÖоÙÐÐÊý¾ÝÅÌÎÊ¡£ÔÚ¿ØÖÆÆ÷ÖÐÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏ´úÂëÀ´¾ÙÐÐÊý¾ÝÅÌÎÊ£º

$User = M('User');
$list = $User->where('status=1')->select();
$this->assign('list',$list);
$this->display();

µÇ¼ºó¸´ÖÆ

ÒÔÉÏ´úÂëʵÏÖÁ˶ÔÃûΪUserµÄÊý¾Ý±íÖÐstatus¼´ÊÇ1µÄÊý¾Ý¾ÙÐÐÅÌÎÊ  £¬²¢½«ÅÌÎʳöÀ´µÄЧ¹û¸³Öµ¸øÁËlist±äÁ¿¾ÙÐÐչʾ¡£

¶þ¡¢Ìí¼Ó×Ö¶Î

Á¬Ã¦Ñ§Ï°¡°PHPÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

ÈôÊÇÎÒÃÇÐèÒª¶ÔÅÌÎʳöµÄÊý¾ÝÌí¼ÓÒ»¸ö×Ö¶ÎÓÃÀ´¾ÙÐбê¼Ç»òÕßÆäËû²Ù×÷  £¬ÐèÒªÔõÑùʵÏÖÄØ£¿

ÔÚThinkPHPÖÐ  £¬ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏÂÒªÁìΪÅÌÎʳöÀ´µÄÊý¾ÝÌí¼Ó×ֶΣº

$User = M('User');
$list = $User->where('status=1')->select();
foreach ($list as $key=>$val){
    $list[$key]['new_field'] = 'new_value';
}
$this->assign('list',$list);
$this->display();

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÒÔÉÏ´úÂëÖÐ  £¬ÎÒÃÇÔÚÑ­»·±éÀúÅÌÎÊЧ¹ûʱ  £¬ÐÂÔöÁËÒ»¸önew_field×ֶΠ £¬²¢½«ÆäÖµ¸³Îªnew_value¡£ÎÒÃÇÐèҪʹÓÃforeachÓï¾ä¶Ô¶þάÊý×é$list¾ÙÐÐÑ­»·±éÀú  £¬ÕâÊÇÐèҪעÖصÄ¡£

Èý¡¢ÍêÕû´úÂë

×îÖյĴúÂëÈçÏ£º

$User = M('User');
$list = $User->where('status=1')->select();
foreach ($list as $key=>$val){
    $list[$key]['new_field'] = 'new_value';
}
$this->assign('list',$list);
$this->display();

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÒÔÉϾÍÊÇThinkPHPÖÐÔõô¾ÙÐÐÊý¾ÝÅÌÎʺóÌí¼Ó×ֶεÄÏêϸÄÚÈÝ  £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí  £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø  £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È  £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ  £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢  £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢  £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå  £¬9:30-18:30  £¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿