php insert command failure I have a mySQL database I am accessing via php using the code
if(!$connection = mysql_pconnect("localhost",DBUSER,DBUSERPW))
{
Fatalerror($connection);
}
then calling
if(!mysql_select_db(DATABASE,$connection)) to select the database.
where DBUSER,DBUSERPW and DATABASE are defined variables
These functions appear to operate correctly.
If I run SELECT queries, using $result=mysql_query($query,$connection);
I get the correct data returned from the database.
However, running INSERT queries fail.
mysql_errno($connection) and mysql_error() both return empty strings,
giving no indication of the cause of the error.
I have checked the insert query syntax by cutting and pasting into mySQL
at the command line.
mysql -h returns
mysql Ver 14.7 Distrib 4.1.12, for mandriva-linux-gnu (i586) using
readline 5.0
..... cut ....
auto-rehash TRUE
character-sets-dir (No default value)
default-character-set latin1
compress FALSE
database (No default value)
delimiter ;
vertical FALSE
force FALSE
named-commands FALSE
local-infile FALSE
no-beep FALSE
host (No default value)
html FALSE
xml FALSE
line-numbers TRUE
unbuffered FALSE
column-names TRUE
sigint-ignore FALSE
port 3306
prompt mysql>
quick FALSE
raw FALSE
reconnect TRUE
socket (No default value)
ssl FALSE
ssl-key (No default value)
ssl-cert (No default value)
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cipher (No default value)
table FALSE
debug-info FALSE
user (No default value)
safe-updates FALSE
i-am-a-dummy FALSE
connect_timeout 0
max_allowed_packet 16777216
net_buffer_length 16384
select_limit 1000
max_join_size 1000000
secure-auth FALSE
Does this indicate that my php or mySQL setup is wrong ?
I searched google groups, with no luck.
Thanks in advance
Carlton. |