/*
10.4.3.10. Adding the DISTINCT Query Modifier

The distinct() method enables you to add the
DISTINCT keyword to your SQL query.

Example 10.63. Example of the distinct() method
*/

<?php


// Build this query:
// SELECT DISTINCT p."product_name"
// FROM "products" AS p
 
 
 
$select=$db->select()
->distinct()
->from(array('p'=>'products'),'product_name');


UPDATE modifier to your SQL query
*/
?>

/*
10.4.3.11. Adding the FOR UPDATE Query Modifier

The forUpdate() method enables you to add the FOR

2:SELECT COUNT(DISTINCT(CIN_Number)) as NumberofCases, MMT_Number as NumberOfCase  FROM material

$select=$db->select()
->from('material',
array(
'NumberOfCases'
         =>new Zend_Db_Expr('COUNT(DISTINCT CIN_Number)'),
'MMT_Number'
))
->group('MMT_Number');



相关文章:

  • 2021-11-15
  • 2021-09-13
  • 2021-08-16
  • 2021-08-16
  • 2021-08-06
  • 2021-10-26
  • 2021-08-04
猜你喜欢
  • 2021-07-01
  • 2021-12-19
  • 2021-10-17
  • 2021-05-19
  • 2021-06-13
  • 2022-01-23
  • 2021-09-15
相关资源
相似解决方案