Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

subquery in mysql

SELECT date(uploaded_date) FROM `tbl_attach_po_docs` where type_id=1 and attach_po_doc_id = (SELECT max(attach_po_doc_id) where type_id=1) limit 1;

//or
SELECT if(max(attach_po_doc_id) && type_id =1,date(uploaded_date),'') FROM `tbl_attach_po_docs` where 1
 
PREVIOUS NEXT
Tagged: #subquery #mysql
ADD COMMENT
Topic
Name
7+3 =