Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Using mysql variables and stacking mysql calls
#1

[eluser]Unknown[/eluser]
Is there a way to perform the following in CI?

Code:
$this->db->query('SET @rownum = 0; UPDATE eye_colors SET sort_order = 0; UPDATE eye_colors SET sort_order = @rownum:=@rownum+1 ORDER BY color_name');

This works in phpmyadmin, so I need the CI workaround ... stored proc?

Regards,
Scott.


Messages In This Thread
[SOLVED] Using mysql variables and stacking mysql calls - by El Forum - 01-18-2011, 09:25 AM
[SOLVED] Using mysql variables and stacking mysql calls - by El Forum - 01-18-2011, 09:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB