Hi all:
I am attempting to write a dynamic array and I ready for some help! My goal is to call the SELECT statement and populate 3 columns using FOR. I am very far from my goal right now!!! Here is the code. If someone could clean it up so I see the proper format that would be perfect and appreciated. I have looked for some sample code for a dynamic array and couldn't find any. Again...thanks...
<?php
if (strlen($_Get("OB"))==00){ //THIS IS LINE 30
$iOB = "Player, WishCount DESC";
}
else
{
$iOB = ($_Get("OB"))==0;
}
?>
<td class="text-box" style="width:33%; height:34px; vertical-align:text-top; padding-left:10px;">
<?php
$myServer = "XX.XX.XX.XX.XX";
$myUser = "XXXXXXXX";
$myPass = "XXXXXX";
$myDB = "XXXXXXXX";
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn't open database $myDB");
$sql0 = "SELECT COUNT (DISTINCT Player) AS Total FROM Wish";
$result0 = mssql_query($sql0);
$row0= mssql_fetch_array($result0);
$counter0 = $row0['Total'];
$sql1 = "SELECT Player, WishCount FROM Wish ORDER BY $iOB";
$result1 = mssql_query($sql1);
$row1= mssql_fetch_array($result1);
$counter1 = $row1['Player'];
$counter2 = $row1['Wishcount'];
if (empty($counter1)) {
echo 'No Players on WishList at this time';
}
else
{
for ($ia=0; $ia<=count($arrPlayers)-1; $ia++) {
$iRCount++;
?>
<?
echo $arrPlayers(0, ia());
?>
<?
echo $arrPlayers(1, ia());
}
?>
<br />
<?php
if ($iRCount = Int($iTotal/3)){
echo "</td><td class='text-box' style='width:33%; height:34px; vertical-align:text-top; padding-left:10px;'>";
}
if ($iRCount = Int($iTotal*2/3)){
echo "</td><td class='text-box' style='width:33%; height:34px; vertical-align:text-top; padding-left:10px;'>";
}
}
mssql_close($dbhandle);
?>
Error:
Notice: Undefined variable: _Get in C:\Web\MySite\wsl\wsl_wsl.php on line 30
Fatal error: Function name must be a string in C:\Web\MySite\wsl\wsl_wsl.php on line 30