Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: PHP error!

  1. #11
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Lucie
    the relationship: the animalName field is a primary key in both the NK_Booking table and the NK_BookingHandler table.
    What's the foreign key in NK_Booking, though?

    There's something bizarre about all this. If animalName is the primary key for NK_Booking and that's part of the condition, why do you need anything else to select a unique tuple? Is animalName part of a compound key? Are your primary keys not unique (if not, that's a serious flaw)?

    Therefore I have tried the following code with an inner join.
    A literal JOIN isn't possible in an UPDATE query. That's why I used a scalar subquery: it produces the same effect.

    Mike

  2. #12
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    ^told ya someone would know.

    Ha

  3. #13
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dear Lucie is ur problem solved.

    Hi Lucie,

    Is ur problem solved ? Else check below step & it will defeneatly works.

    1. Check animalName, handlerName, startDate all this field exist in NK_Booking table. Also fields names r case sensitive so write as u had written it in mySQL. If possible then copy & paste field name from mySQL to ur PHP page query.

    2. Also copy below query & check it.

    $sql1 ="UPDATE NK_Booking SET reviewtext = '" . $ownerreview . "' WHERE animalName = '" . $animalname . "', handlerName = '" . $handlername . "',
    startDate = '" . $startdate . "'";

    3. If this will not solve or solve ur problem then email me on snowbydave1@hotmail.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •