Welcome Guest, Not a member yet? Register   Sign In
Stored Procedures - OUT
#1

[eluser]coolant[/eluser]
I have the following code -

Code:
$sql = 'CALL new_user(?, @user_id)';
$query = $this->db->query( $sql, array( $name ) );
print_r ( $query->result_array() );

echo '<br />';  

$sql = 'SELECT @user_id';
$query = $this->db->query( $sql );
print_r ( $query->result_array() );

The first result_array() returns nothing, while the second one returns the correct number. Is there anyway built-in to CI that allows me to select the variable returned from an OUT without running select @user_id?

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB