I wonder how to send items to all players using php,
<?php
$serverName = "BOKNOY-PC\SQLEXPRESS";
$UID = "sa";
$PASS ="123456";
$connectionInfo = array("Database" => "RohanGame", "UID" => $UID, "PWD" => $PASS);
$conn = sqlsrv_connect($serverName, $connectionInfo);
$sql="GO
DECLARE @a Integer = 491891;
DECLARE @i Integer;
SELECT @i = COUNT(id) FROM [RohanGame].dbo.TCharacter
SET @i = @i + 491891
WHILE (@a < @i)
BEGIN
INSERT INTO [RohanGame].dbo.TEventItem(type,attr,stack,rank,date,char_id) VALUES ('$_POST[type]', 0, '$_POST[stack]', 1, '02-05-1995', @a)
SET @a = @a + 1
END";
$stmt = sqlsrv_query($conn, $sql);
echo "The item has been inserted to all character.";
?>
This Script is successfully inserted items on some players, but to the players like newly registered or registered before insertion don't get items.
if someone could help me please..

(sorry for bad english) xD