PHP problems

Posted: October 2nd, 2008 under PHP.

PHP problems and solutions

5 Comments »

  • Comment by Mike W — October 2, 2008 @ 4:55 pm

    1

    I’ve having a problem with PDO. I have one query that uses a variable
    ($uid) and it does seem to work, but the next query somehow is using 0 for that variable even though the value is non-zero.

    $uid = $this->id

    try {
    $stmt = $dbh->prepare(”DELETE FROM Customer_VIC WHERE customerID=?”); $stmt->bindParam(1, $uid); $stmt->execute();

    for ($i = 1; $i prepare(”INSERT INTO Customer_VIC (vendorID, customerID) VALUES (vendorID=?, customerID=?)”); $stmt->bindParam(1, $vendorID); $stmt->bindParam(2, $uid); $stmt->execute(); } } catch (PDOException $e) { print “Error!: exception in update customer vics”; }


  • Comment by Tim678 — October 2, 2008 @ 5:02 pm

    2

    Mike W wrote on 10-02-08
    [...but the next query somehow is using 0 for that variable even though the value is non-zero.

    $uid = $this->id

    try {
    $stmt = $dbh->prepare("DELETE FROM Customer_VIC WHERE customerID=?"); $stmt->bindParam(1, $uid); $stmt->execute();

    for ($i = 1; $i prepare("INSERT INTO Customer_VIC (vendorID, customerID) VALUES (vendorID=?, customerID=?)"); $stmt->bindParam(1, $vendorID); $stmt->bindParam(2, $uid); $stmt->execute(); } } catch (PDOException $e) { print "Error!: exception in update customer vics"; }]

    Mike, it should should read:
    $stmt = $dbh->prepare(”INSERT INTO Customer_VIC (vendorID, customerID) VALUES (?, ?)”);


  • Comment by Ken R. — October 4, 2008 @ 1:53 pm

    3

    I was wondering if anyone used a good PHP billing system w/ recurring billing that lets you easily define (w/o programming) various options - e.g. one client has purchased 5 options, another has 3 different ones, etc.? It would also need to allow the client to enter text per option.


  • Comment by Jamiesum67 — October 4, 2008 @ 2:16 pm

    4

    Hi everybody,

    Can someone suggest some good easy to understand php tutorials or suggest how I can get up and running coding with php very quickly?

    Thank very much for your time,

    Jamie


  • Comment by Frog47 — October 17, 2008 @ 10:32 am

    5

    10/04/08 quoting Jamie
    < <--Can someone suggest some good easy to understand php tutorials or suggest how I can get up and running coding with php very quickly?-->>

    PHP is such a vast monster to fully grasp quickly. You can get some of the basics quickly though. The website http://www.tizag.com/phpT/index.php has some really good information and it’s good for getting started as well. If you have programming background in javascript you should be able to follow along easily.

    Hope that helps you,
    Frog


RSS feed for comments on this post. TrackBack URL

Leave a comment