Auto increment in select statement
Copy this code and paste it in your HTML
core_objective_sub_items,
(select objective_ptr_id
, @rank
:=@rank
+1 AS rank
from core_task
) as one
core_objective_sub_items.to_objective_id=one.objective_ptr_id
one.rank = core_objective_sub_items.id;
Report this snippet
Comments
Subscribe to comments