RE: can someone help!

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

 



For example:

Is the db connection successful or does the code respond with the "Unable to
create an ADODB connection" error you have implemented?

If you echo the query before sending it to the db, does the query look like
you expect it to?

Is the query returning any data? Is it the expected data? If not, what,
exactly is being returned?

Does the same query work from the command line (or within native Access)?

Are there any errors being returned by either PHP or the database that might
indicate what the problem is?

Is there any HTML output to the screen? Is it what you expected? If not, how
does it differ from what you expected?

It also appears that you're using a db abstraction layer or class(?). Can
that layer or class be used successfully elsewhere or is this the only place
where there is a problem?

These are just a few of the things that would point this list in the right
direction and allow us to help. That's what I meant by stating what the
problem is; the difference between what is happening and what you expect to
happen.

> -----Original Message-----
> From: Blain [mailto:Blain@gmx.ch]
> Sent: Tuesday, April 08, 2003 11:36 AM
> To: Hutchins, Richard; php-db@lists.php.net
> Subject: AW:  can someone help!
> 
> 
> Thats the Problem! He don't what it is!
> 
> -----Ursprüngliche Nachricht-----
> Von: Hutchins, Richard [mailto:Richard.Hutchins@Getingeusa.com]
> Gesendet: Dienstag, 8. April 2003 14:29
> An: php-db@lists.php.net
> Betreff: RE:  can someone help!
> 
> 
> With what? You didn't state what the problem is.
> 
> > -----Original Message-----
> > From: Kiswa [mailto:Kiswa@telia.com]
> > Sent: Tuesday, April 08, 2003 4:11 AM
> > To: php-db@lists.php.net
> > Subject:  can someone help!
> >
> >
> >
> >  if (!$conn2 = new COM("ADODB.Connection"))
> >     exit("Unable to create an ADODB connection<br>");
> >
> > $strConn2 = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" .
> > realpath("db\kap.mdb");
> >
> >     $conn2->open($strConn2);
> >
> >     $strSQL2 = "SELECT Ip, Artikelnr, Antal FROM Best where
> > Ip='$SESSID'";
> >     $rs2 = $conn2->execute($strSQL2);
> >
> >  $Ip = $rs2->Fields(0);
> >  $Art = $rs2->Fields(1);
> >  $Ant = $rs2->Fields(2);
> >
> >  while (!$rs2->EOF)
> >     {
> >  if($Ip->value==$SESSID){
> > /*
> > --------------------------------------------------------------
> > -----------
> > -------------------------------------------- */
> >  if (!$conn = new COM("ADODB.Connection"))
> >     exit("Unable to create an ADODB connection<br>");
> >
> > $strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" .
> > realpath("db\webdb.mdb");
> >
> >     $conn->open($strConn);
> >
> >     $strSQL = "SELECT Kategori, Produkt, Pris, Artikelnr, 
> Lagerstatus,
> > Beskrivning, Bild FROM Data where Artikelnr='$Art->value'";
> >     $rs = $conn->execute($strSQL);
> >
> >  $Kategori = $rs->Fields(0);
> >  $Produkt = $rs->Fields(1);
> >     $Pris = $rs->Fields(2);
> >  $Artikelnr = $rs->Fields(3);
> >  $Lagerstatus = $rs->Fields(4);
> >  $Beskrivning = $rs->Fields(5);
> >  $Bild = $rs->Fields(6);
> >
> >  $Totalpris=$Pris->value * $Ant->value;
> >    $Totalprisalla = $Totalpris + $Totalprisalla;
> >    echo "<OPTION>$Ant->value st $Produkt->value</OPTION>";
> >
> >  $rs->Close();
> >     $conn->Close();
> >     $rs = null;
> >     $conn = null;
> >
> > /*
> > --------------------------------------------------------------
> > -----------
> > -------------------------------------------- */
> >   }
> >    $rs2->MoveNext();
> >     }
> >
> >  $rs2->Close();
> >     $conn2->Close();
> >     $rs2 = null;
> >     $conn2 = null;
> >  }
> >  $A = 1.25;
> >   $TotalprisInkmoms = $Totalprisalla * $A;
> >
> >   if($TotalprisInkmoms<>"0"){
> >   echo "
> >   <OPTION></OPTION>
> >   <OPTION>Ex.moms  $Totalprisalla  KR</OPTION>
> >   <OPTION>Ink.moms  $TotalprisInkmoms  KR</OPTION>";
> >   }
> >   if($TotalprisInkmoms=="0"){
> >   echo "
> >   <OPTION>Du har inga varor i kundvagnen!</OPTION>";
> >   }
> >  ?>
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux