English 中文(简体)
CakePHP——深处发现 战略
原标题:CakePHP - Deep find() Strategy

我使用的是2千卡,我有以下模式:

I would like to use the find() method to give me a list of all the Artists along with the number of Products they have in their portfolio and the number they have in their archive. An may have no Products.

A is in the Artists portfolio if its ProductAvailability.name = For sale or if its ProductAvailability.name = Sold and the Order.date on which it was sold is less than 30 days in the past.

一种产品载于Artists 档案中,如果其ProductAvailability.name = Sold >Order.date 出售该产品 过去30天。

示范协会:

Artist hasMany Product
Product belongsTo Artist

Product belongsTo ProductAvailability
ProductAvailability hasMany Product

OrderDetail belongsTo Product
Product hasMany OrderDetail

我倾向于使用<代码>find()方法,而不是<代码>query()方法进行可携带性和测试。 任何想法?

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...