I'm in OS X 10.2 (Jaguar) Apache/PHP/MySQL are all playing happily
together, so it's time to get some work done. From the MySQL client,
this query does what I expect it to:
update endpage set productname='Berenice lamp', bgcolor='eec472',
imgsrc='bereniceep.jpg', img_orientation='horizontal',
[snip]
from the php page however, it does not work, even though it appears
to be generating a perfectly good querry... Here's the PHP
$connection = mysql_connect(server, user, pass) or
die(Couldn't connect.);
$db = mysql_select_db($db_name, $connection) or die(Couldn't select
database.);
$query
[snip]
2. Trap MySQL errors for the query by doing something like this;
if(!($result = mysql_query($query, ))){
print(MySQL reports: . mysql_error . \n);
exit();
}
[/snip]
TYPO!!! :^] Should be mysql_error() (note the parentheses)
HTH!
Jay
3 matches
Mail list logo