I have a mysql stored procedure that takes 3 parameters – 2 In and 1 out
I am calling this procedure from php using mysqli
The procedure will return 1 row and I use the following code when calling it
$result = $mysqli->query("call get_hybrid_auth_session('".$userId."','".$loginSystem."', @hybridAuthSession)");
$result = $mysqli->query( 'SELECT @hybridAuthSession' );
$row = $result->fetch_object();
When I do a var_dump on the $row attribute, I get the following text back
object(stdClass)#16 (1) { ["@hybridAuthSession"]=> string(287) ".a:3:{s:40:"hauth_session.twitter.token.access_token";s:56:"s:48:"23801232-fkv05uitVRobpItrFFUn15I4Ejl0w80pr7GOH0A";";s:47:"hauth_session.twitter.token.access_token_secret";s:51:"s:43:"VKsFaQWnP8n9OcZK3MDCgRHQY0roLTFVXesBuONCYJo";";s:34:"hauth_session.twitter.is_logged_in";s:4:"i:1;";}." }
When I do a var_dump on the $row->{“@hybridAuthSession”} attribute, I get the following value back
string(287) ".a:3:{s:40:"hauth_session.twitter.token.access_token";s:56:"s:48:"23801232-fkv05uitVRobpItrFFUn15I4Ejl0w80pr7GOH0A";";s:47:"hauth_session.twitter.token.access_token_secret";s:51:"s:43:"VKsFaQWnP8n9OcZK3MDCgRHQY0roLTFVXesBuONCYJo";";s:34:"hauth_session.twitter.is_logged_in";s:4:"i:1;";}."
Is there any way to not receive the string(287) value at the start?
The hybridAuthSession Out parameter is defined as Text in my stored procedure
Var dump was adding additional information when outputting the text to the screen which is its expected behaviour.
After some more tests, the code was working as expected