Variable is nor right but how

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fedor

    Variable is nor right but how

    I am trying to make a change to a php program,
    Could you see the error

    $t = $_SESSION[f_or_temp_data][f_or_st_id];
    $query = "select vinalux.fabric, size.size_heigh t_max, price.size_key
    from vinalux join (size, price)
    where price.size_key = $t";

    I get the error

    Could Not Execute SQL statementYou have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for the
    right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
    size.size_wi

    If I change it to
    where price.size_key = '$t' ";
    The error stays the same


    Could you give me a clou
    thanks for your time

    Fedor
  • IanB

    #2
    Re: Variable is nor right but how

    You need an "ON" clause to tell it what to join the table with

    SELECT * FROM a JOIN b ON a.postcode = b.postcode WHERE a.name = 'Fred'

    fedor wrote:
    I am trying to make a change to a php program,
    Could you see the error
    >
    $t = $_SESSION[f_or_temp_data][f_or_st_id];
    $query = "select vinalux.fabric, size.size_heigh t_max, price.size_key
    from vinalux join (size, price)
    where price.size_key = $t";
    >
    I get the error
    >
    Could Not Execute SQL statementYou have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for the
    right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
    size.size_wi
    >
    If I change it to
    where price.size_key = '$t' ";
    The error stays the same
    >
    >
    Could you give me a clou
    thanks for your time
    >
    Fedor

    Comment

    • Captain Paralytic

      #3
      Re: Variable is nor right but how


      fedor wrote:
      I am trying to make a change to a php program,
      Could you see the error
      >
      $t = $_SESSION[f_or_temp_data][f_or_st_id];
      $query = "select vinalux.fabric, size.size_heigh t_max, price.size_key
      from vinalux join (size, price)
      where price.size_key = $t";
      >
      I get the error
      >
      Could Not Execute SQL statementYou have an error in your SQL syntax.
      Check the manual that corresponds to your MySQL server version for the
      right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
      size.size_wi
      >
      If I change it to
      where price.size_key = '$t' ";
      The error stays the same
      >
      >
      Could you give me a clou
      thanks for your time
      >
      Fedor
      Please don't cross post! You have already had your reply in another
      forum

      Comment

      • Jerry Stuckle

        #4
        Re: Variable is nor right but how

        Captain Paralytic wrote:
        fedor wrote:
        >
        >>I am trying to make a change to a php program,
        >>Could you see the error
        >>
        >>$t = $_SESSION[f_or_temp_data][f_or_st_id];
        >>$query = "select vinalux.fabric, size.size_heigh t_max, price.size_key
        > from vinalux join (size, price)
        > where price.size_key = $t";
        >>
        >>I get the error
        >>
        >>Could Not Execute SQL statementYou have an error in your SQL syntax.
        >>Check the manual that corresponds to your MySQL server version for the
        >>right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
        >>size.size_w i
        >>
        >>If I change it to
        >>where price.size_key = '$t' ";
        >>The error stays the same
        >>
        >>
        >>Could you give me a clou
        >>thanks for your time
        >>
        >>Fedor
        >
        Please don't cross post! You have already had your reply in another
        forum
        >
        Wrong. Cross-posting is good. Multi-posting is bad.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • Rik

          #5
          Re: Variable is nor right but how

          Jerry Stuckle wrote:
          >Please don't cross post! You have already had your reply in another
          >forum
          >
          Wrong. Cross-posting is good. Multi-posting is bad.
          Well, cross-posting is the lesser of the evils, not good. Only when you're
          very sure you _need_ more groups.
          --
          Rik Wasmus


          Comment

          • Captain Paralytic

            #6
            Re: Variable is nor right but how

            Rik wrote:
            Jerry Stuckle wrote:
            Please don't cross post! You have already had your reply in another
            forum
            Wrong. Cross-posting is good. Multi-posting is bad.
            >
            Well, cross-posting is the lesser of the evils, not good. Only when you're
            very sure you _need_ more groups.
            --
            Rik Wasmus
            I agree. However Jerry was right that I was wrong. I realised that I
            had said "cross" instead of "multi" just after I had pressed "Post
            message"!

            Comment

            • Jerry Stuckle

              #7
              Re: Variable is nor right but how

              Captain Paralytic wrote:
              Rik wrote:
              >
              >>Jerry Stuckle wrote:
              >>
              >>>>Please don't cross post! You have already had your reply in another
              >>>>forum
              >>>
              >>>Wrong. Cross-posting is good. Multi-posting is bad.
              >>
              >>Well, cross-posting is the lesser of the evils, not good. Only when you're
              >>very sure you _need_ more groups.
              >>--
              >>Rik Wasmus
              >
              >
              I agree. However Jerry was right that I was wrong. I realised that I
              had said "cross" instead of "multi" just after I had pressed "Post
              message"!
              >
              Don't you just hate when that happens? :-)

              --
              =============== ===
              Remove the "x" from my email address
              Jerry Stuckle
              JDS Computer Training Corp.
              jstucklex@attgl obal.net
              =============== ===

              Comment

              • Captain Paralytic

                #8
                Re: Variable is nor right but how


                Jerry Stuckle wrote:
                Captain Paralytic wrote:
                Rik wrote:
                >Jerry Stuckle wrote:
                >
                >>>Please don't cross post! You have already had your reply in another
                >>>forum
                >>
                >>Wrong. Cross-posting is good. Multi-posting is bad.
                >
                >Well, cross-posting is the lesser of the evils, not good. Only when you're
                >very sure you _need_ more groups.
                >--
                >Rik Wasmus

                I agree. However Jerry was right that I was wrong. I realised that I
                had said "cross" instead of "multi" just after I had pressed "Post
                message"!
                >
                Don't you just hate when that happens? :-)
                Yeah, the "Undo" button just doesn't hack it in that situation!

                Comment

                • Shelly

                  #9
                  Re: Variable is nor right but how


                  "Captain Paralytic" <paul_lautman@y ahoo.comwrote in message
                  news:1162375044 .482896.95230@i 42g2000cwa.goog legroups.com...
                  >
                  Jerry Stuckle wrote:
                  >Captain Paralytic wrote:
                  Rik wrote:
                  >
                  >>Jerry Stuckle wrote:
                  >>
                  >>>>Please don't cross post! You have already had your reply in another
                  >>>>forum
                  >>>
                  >>>Wrong. Cross-posting is good. Multi-posting is bad.
                  >>
                  >>Well, cross-posting is the lesser of the evils, not good. Only when
                  >>you're
                  >>very sure you _need_ more groups.
                  >>--
                  >>Rik Wasmus
                  >
                  >
                  I agree. However Jerry was right that I was wrong. I realised that I
                  had said "cross" instead of "multi" just after I had pressed "Post
                  message"!
                  >
                  >>
                  >Don't you just hate when that happens? :-)
                  >
                  Yeah, the "Undo" button just doesn't hack it in that situation!
                  I have found that there are two goups that are virutally identical, this one
                  and alt.comp.lang.p hp. I have also found that by multi-posting to the two
                  groups I have sometimes (seldom) received answers from alt.comp.lang.p hp
                  before (or even sometimes only) before getting help from this one.
                  Therefore, I multi-post to the two.

                  Now, when two groups are SOOOO close, couldn't something be done to unify
                  the two so that going to the less popular one (the other one) would
                  automatically redirect the user to this one?

                  Shelly


                  Comment

                  • Jerry Stuckle

                    #10
                    Re: Variable is nor right but how

                    Shelly wrote:
                    "Captain Paralytic" <paul_lautman@y ahoo.comwrote in message
                    news:1162375044 .482896.95230@i 42g2000cwa.goog legroups.com...
                    >
                    >>Jerry Stuckle wrote:
                    >>
                    >>>Captain Paralytic wrote:
                    >>>
                    >>>>Rik wrote:
                    >>>>
                    >>>>
                    >>>>>Jerry Stuckle wrote:
                    >>>>>
                    >>>>>
                    >>>>>>>Please don't cross post! You have already had your reply in another
                    >>>>>>>forum
                    >>>>>>
                    >>>>>>Wrong. Cross-posting is good. Multi-posting is bad.
                    >>>>>
                    >>>>>Well, cross-posting is the lesser of the evils, not good. Only when
                    >>>>>you're
                    >>>>>very sure you _need_ more groups.
                    >>>>>--
                    >>>>>Rik Wasmus
                    >>>>
                    >>>>
                    >>>>I agree. However Jerry was right that I was wrong. I realised that I
                    >>>>had said "cross" instead of "multi" just after I had pressed "Post
                    >>>>message"!
                    >>>>
                    >>>
                    >>>Don't you just hate when that happens? :-)
                    >>
                    >>Yeah, the "Undo" button just doesn't hack it in that situation!
                    >
                    >
                    I have found that there are two goups that are virutally identical, this one
                    and alt.comp.lang.p hp. I have also found that by multi-posting to the two
                    groups I have sometimes (seldom) received answers from alt.comp.lang.p hp
                    before (or even sometimes only) before getting help from this one.
                    Therefore, I multi-post to the two.
                    >
                    Now, when two groups are SOOOO close, couldn't something be done to unify
                    the two so that going to the less popular one (the other one) would
                    automatically redirect the user to this one?
                    >
                    Shelly
                    >
                    >
                    Nope, usenet doesn't work that way. One group cannot be redirected to
                    another.

                    alt.comp.lang.p hp is the older group, but being an 'alt' group has not
                    been 'sanctioned' by the PTB. Anyone can create an alt group for any
                    reason.

                    comp.lang.php had to go through a longer process - someone had to submit
                    a proposed charter, there was a period of time for comments, the
                    proposed charter had to be voted on, and finally the group could be
                    created. So it is more 'official' in that respect.

                    But both groups are OK.

                    And you should not be multi-posting. Rather you should be cross-posting.

                    --
                    =============== ===
                    Remove the "x" from my email address
                    Jerry Stuckle
                    JDS Computer Training Corp.
                    jstucklex@attgl obal.net
                    =============== ===

                    Comment

                    • Shelly

                      #11
                      Re: Variable is nor right but how


                      "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                      news:eO-dnYSHPIiABdXYnZ 2dnUVZ_t6dnZ2d@ comcast.com...
                      But both groups are OK.
                      >
                      And you should not be multi-posting. Rather you should be cross-posting.
                      I put two addresses in and submit both at the same time.


                      Comment

                      Working...