前端之家收集整理的这篇文章主要介绍了
thinkphp 数据模型 小记,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<div class="cnblogs_code">
<span style="color: #800080;">$cond['platform_id'] = <span style="color: #0000FF;">array('eq', <span style="color: #800080;">$p['keyword']);<span style="color: #800080;">$cond['uid'] = <span style="color: #0000FF;">array('eq', <span style="color: #800080;">$p['keyword']);<span style="color: #800080;">$cond['_logic'] = 'or';
<span style="color: #800080;">$cond = <span style="color: #0000FF;">array(); <span style="color: #800080;">$cond['_complex1'] = <span style="color: #0000FF;">array( 'dna1' => <span style="color: #0000FF;">array('like', '%'.<span style="color: #800080;">$animals[0].'%'), 'dna2' => <span style="color: #0000FF;">array('like', '%'.<span style="color: #800080;">$animals[1].'%'), ); <span style="color: #800080;">$cond['_complex2'] = <span style="color: #0000FF;">array( 'dna1' => <span style="color: #0000FF;">array('like', ); <span style="color: #800080;">$cond['_logic'] = 'or'; <span style="color: #800080;">$conf = <span style="color: #800080;">$core_combine->where(<span style="color: #800080;">$cond)->find();