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

[cobalt-developers] Re: Interbase & PHP on RaQ4



Still can't get it to work.
I've tried every combination of quotes, double quotes, etc that I can think of.  Should have explained that the data to be posted is coming from a form and is passed in via the form POST method.  This is what PHPINFO() reports:
HTTP_POST_VARS["form"] Array
(
    [dealerid] => 01811
    [name] => JFPoe Inc
    [address1] => 153 Creekside Ln.
    [address2] =>
    [city] => Winchester
    [state] => VA
    [zip] => 22602
    [country] =>
    [phone] => 555-1212
    [fax] =>
    [email] =>
    [webaddress] =>
    [prodline] => H
)

I can use the ibase_query to do the update and it works fine except when there is a quote in the name or address.  Then I get an UNKNOWN FIELD error from interbase.  If there is a way around that - I don't need the Prepare/Execute senario.

Have tried testing with only one field but still does not work.
The following code:
   $name = "JFPoe Inc.";
   $qrystr = "update dealer set name=? where dealerid='01811'";
   $prepared= ibase_prepare($conn, $qrystr);
   echo $qrystr;
   echo "<br>";
   echo "ibase_execute($prepared,\"$name\") <br>";
  $completed=ibase_execute($prepared,"$name");

  echo "<br>";

  $iberror = ibase_errmsg();
  if (!($iberror == ''))
    {
    echo "$iberror <br>";
    }

causes the following to display - but only if I place a phpinfo(); before the ibase_execute.

update dealer set name=? where dealerid='01811'
update dealer set name=? where dealerid='01811'
ibase_execute(Resource id #3,"JFPoe Inc.")

php.net website says that interbase in in alpha test.  Does this mean that I should start learning ASP or pick a new database?  I've used interbase for years on an NT platform, and have been impressed with speed and reliablilty.

I should note that phpinfo(); reports: PHP Version 4.0.3pl1