anonīms Posted January 16, 2012 Report Share Posted January 16, 2012 (edited) Interesē vai ir iespējams veikt UPDATE kopā ar LEFT JOIN. Pašlaik kodā man ir šādi: db_query(" UPDATE {node} SET node.status=0 LEFT JOIN {content_type_product} ON node.nid = content_type_product.nid WHERE node.type='product' AND content_type_product.field_manual_value IN ('off','NULL')"); kas met sintakses erroru. Es gan neatceros, kurā vietā šādu piemēru atradu,jo kādu laiku atpakaļ tas tika taisīts. Kādi varianti? Tas vispār ir iespējams? Aj, ignorējiet šito muļķi :D db_query(" UPDATE {node} LEFT JOIN {content_type_product} ON node.nid = content_type_product.nid SET node.status=0 WHERE node.type='product' AND content_type_product.field_manual_value IN ('off','NULL')"); TS Edited January 16, 2012 by anonīms Link to comment Share on other sites More sharing options...
daGrevis Posted January 16, 2012 Report Share Posted January 16, 2012 http://stackoverflow.com/questions/806882/update-multiple-tables-in-mysql-using-left-join Link to comment Share on other sites More sharing options...
Recommended Posts