nemec Posted April 8, 2008 Report Posted April 8, 2008 UPDATE `task` AS t LEFT JOIN `proj` AS pr ON pr.`id`=t.`pr_id` SET t.`name`='' WHERE t.`id`='89' AND (pr.`user_id`='1' OR t.`user_id`='1') LIMIT 1 kāpēc nevar lietot limit?
Gints Plivna Posted April 8, 2008 Report Posted April 8, 2008 Viss kā parasti ;) rakstīts manuālī: Single-table syntax: UPDATE [LOW_PRIORITY] [iGNORE] tbl_name SET col_name1=expr1 [, col_name2=expr2 ...] [WHERE where_condition] [ORDER BY ...] [LIMIT row_count] Multiple-table syntax: UPDATE [LOW_PRIORITY] [iGNORE] table_references SET col_name1=expr1 [, col_name2=expr2 ...] [WHERE where_condition] For the multiple-table syntax, UPDATE updates rows in each table named in table_references that satisfy the conditions. In this case, ORDER BY and LIMIT cannot be used. Gints Plivna http://datubazes.wordpress.com
nemec Posted April 8, 2008 Author Report Posted April 8, 2008 un kāds tam būtu loģisks izkaidrojums, jo šobrīd es nesaprotu šos ierobežojumus. šitā iemesla pēc man jāraksta perversi pieprasījumi.
Recommended Posts