RE: using mysql in php problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I am not sure where exactly I am going so wrong, and it really is starting
> to drive me crazy!
> Regards
> Garth


Hi Garth,

Looks like it's time to do some fairly standard debugging. 

Try putting error_reporting(E_ALL) at the top of the page in question. It
may be that you're currently missing out on helpful error messages because
E_NOTICE messages are suppressed by default.

Also, try assigning your SQL statements to a variable and echoing them and
them copying and pasting them directly either into the MySQL command line
client or via the PHPMyAdmin SQL tab, if you have the package available (or
via any other client that allows you to run SQL against your server which
might report more verbose errors than your installation of PHP has been set
to do).

Ie something like:

$sql = "INSERT INTO business_communication
> (BusinessID,CommunicationType,Destination) VALUES ( '" . $id . "', 1, '".
> $HTTP_POST_VARS['telnumber1'] . "')";

echo $sql;

mysql_query($sql);

...and so on, for each of your SQL statements.

Essentially, you're trying to make certain that the variables you've
populated from your form actually contain the data you expect. It's entirely
possible that one or more of your variables isn't populated correctly, and
this is causing your statement(s) to fail, without an error being reported.

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux