$sql="INSERT INTO tbl_user (username, email) VALUES(:username,:email)";
$command=$connection->createCommand($sql);
// replace the placeholder ":username" with the actual username value
$command->bindParam(":username",$username,PDO::PARAM_STR);
// replace the placeholder ":email" with the actual email value
$command->bindParam(":email",$email,PDO::PARAM_STR);
$command->execute();
// insert another row with a new set of parameters
$command->bindParam(":username",$username2,PDO::PARAM_STR);
$command->bindParam(":email",$email2,PDO::PARAM_STR);
$command->execute();
binding with bindParam function is bidirectional (by reference), so you should get return value in one of such defined params. If you want to bind only value (by value) - use bindValue function instead.
Thank You again . I tried this approach but this also didn’t help . May be I am doing some thing . As you said It should work . I tried even changing SP parameter to INOUT but still no luck . I will see if I can get any exceptions for this and try to debug it .