Here's the code I've got, I can delete, and insert so I know the connection area is working fine, however I run either of the sqlqry queries, and it breaks.
does anyone see any reason for the error? the field type is a varchar of 20 characters.
I just don't see why it shouldn't be working it's a simple query.
the other thing that is not understood is I ran the query in the mysql client and it works fine.
k I just thought I 'd be smart and generate the code directly from PHPMyadmin, and that even failed. here's the code it genereated.
$sqlqry = 'SELECT * FROM `ipcounter` WHERE ipaddress=\'70.98.199.104\' LIMIT 0, 30 ';
Here's the way's I have tried.
$cadd = $_SERVER['REMOTE_ADDR'];
$iplogtable = ipcounter;
//$sqlqry = "select * from ipcounter where ipaddress='xxx.xxx.xxx.xxx'"; (changed IP on purpose)
//$sqlqry = "SELECT * FROM $iplogtable where ipaddress=$cadd";
@mysql_query($sqlqry, $connection) or die("Could not execute query.<BR>" . $sqlqry);
$total = mysql_affected_rows();
echo $total;