MySQL table names in PHP code

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

    #16
    Re: MySQL table names in PHP code

    Jerry Stuckle wrote:
    Chuck Anderson wrote:
    >
    >Jerry Stuckle wrote:
    >>
    >>Chuck Anderson wrote:
    >>>
    >>>
    >>>Jerry Stuckle wrote:
    >>>>
    >>>>
    >>>>Chuck Anderson wrote:
    >>>>>
    >>>>>
    >>>>>
    >>>>>MikeB wrote:
    >>>>>>
    >>>>>>
    >>>>>>I'm learning PHP and MySQL. In the samples I work with, the SQL
    >>>>>>table
    >>>>>>names are "escaped" in accent grave (`) marks, not in single or
    >>>>>>double
    >>>>>>quotes.
    >>>>>>>
    >>>>>>Can anyone explain that?
    >>>>>>>
    >>>>>>For instance, I have the following:
    >>>>>>>
    >>>>>>$sql_comm and = "SELECT * from `7-1_List`";
    >>>>>>>
    >>>>>>I tried looking around on the php.net site, but clearly I'm not using
    >>>>>>the right search terms.
    >>>>>>>
    >>>>>>While I'm asking, I think I've figured out how double quotes (")
    >>>>>>differ from single quotes ('), but if there is a discussion that
    >>>>>>someone can point me to, that would be very nice.
    >>>>>>>
    >>>>>>>
    >>>>>Re: quotes - http://us.php.net/types.string
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>Good try, but it has nothing to do with the user's question.
    >>>>>
    >>>>>
    >>>His question (to quote) about "how double quotes (") differ from
    >>>single quotes (')?"
    >>>It's spot on, Jerry. Did you even bother to look? That page it has
    >>>a very thorough discussion of Variable parsing and how to use both
    >>>types.
    >>>>
    >>>>
    >>>B.S.
    >>>>
    >>Read again. He was asking about back tickies (`) in MySQL statements,
    >>not single quotes (') in PHP.
    >>>
    >>It had absolutely nothing to do with PHP strings.
    >>>
    >Du-uh ...... try again He spoke of both. Here I'll quote it for you
    >again:
    >>
    >>
    >>I'm learning PHP and MySQL ......
    >>>
    >>..... While I'm asking, I think I've figured out how double quotes (")
    >>differ from single quotes ('), but if there is a discussion that
    >>someone can point me to, that would be very nice.
    >>>
    >Enough of this waste of time already. Haven't you better things to do?
    >>
    >Case closed.
    >>
    >>
    >
    Yep, you obviously don't understand plain English.
    >
    "I'm learning PHP and MySQL. In the samples I work with, the SQL table
    names are "escaped" in accent grave (`) marks, not in single or double
    quotes.?"
    >
    That's his question - not single vs. double quotes.
    >
    You're right. Case closed.
    >
    >
    Your assumption is clearly wrong.

    --
    *************** **************
    Chuck Anderson • Boulder, CO

    Nothing he's got he really needs
    Twenty first century schizoid man.
    *************** *************** *****

    Comment

    • Guillaume

      #17
      Re: MySQL table names in PHP code

      Chuck Anderson a écrit :
      Your assumption is clearly wrong.
      Yeah, let's do an other discussion about good/bad assumptions, popcorn
      anyone ?

      (Yet I notice that the problem once again occurs with a MySQL related
      problem... though it's not related at all :p)

      Btw guys, you both are "false" in a way, cause you both make
      assumptions. From the OP's post, all I can say is *MAYBE* he wanted to
      definitely clear the ' vs " point, as long as having a solution for his
      issue, *MAYBE* he didn't care at all in the end.
      Don't just say he was thinking a way you're not sure about, yet again :)

      Regards,
      --
      Guillaume

      Comment

      • Jerry Stuckle

        #18
        Re: MySQL table names in PHP code

        Chuck Anderson wrote:
        Jerry Stuckle wrote:
        >Chuck Anderson wrote:
        >>
        >>Jerry Stuckle wrote:
        >>>
        >>>Chuck Anderson wrote:
        >>>>
        >>>>
        >>>>Jerry Stuckle wrote:
        >>>>>
        >>>>>Chuck Anderson wrote:
        >>>>>>
        >>>>>>
        >>>>>>MikeB wrote:
        >>>>>>>
        >>>>>>>I'm learning PHP and MySQL. In the samples I work with, the SQL
        >>>>>>>table
        >>>>>>>names are "escaped" in accent grave (`) marks, not in single or
        >>>>>>>double
        >>>>>>>quotes .
        >>>>>>>>
        >>>>>>>Can anyone explain that?
        >>>>>>>>
        >>>>>>>For instance, I have the following:
        >>>>>>>>
        >>>>>>>$sql_com mand = "SELECT * from `7-1_List`";
        >>>>>>>>
        >>>>>>>I tried looking around on the php.net site, but clearly I'm not
        >>>>>>>using
        >>>>>>>the right search terms.
        >>>>>>>>
        >>>>>>>While I'm asking, I think I've figured out how double quotes (")
        >>>>>>>differ from single quotes ('), but if there is a discussion that
        >>>>>>>someon e can point me to, that would be very nice.
        >>>>>>>>
        >>>>>>Re: quotes - http://us.php.net/types.string
        >>>>>>>
        >>>>>>>
        >>>>>Good try, but it has nothing to do with the user's question.
        >>>>>>
        >>>>His question (to quote) about "how double quotes (") differ from
        >>>>single quotes (')?"
        >>>>It's spot on, Jerry. Did you even bother to look? That page it
        >>>>has a very thorough discussion of Variable parsing and how to use
        >>>>both types.
        >>>>>
        >>>>>
        >>>>B.S.
        >>>>>
        >>>Read again. He was asking about back tickies (`) in MySQL
        >>>statements , not single quotes (') in PHP.
        >>>>
        >>>It had absolutely nothing to do with PHP strings.
        >>>>
        >>Du-uh ...... try again He spoke of both. Here I'll quote it for you
        >>again:
        >>>
        >>>
        >>>I'm learning PHP and MySQL ......
        >>> ..... While I'm asking, I think I've figured out how double
        >>>quotes (")
        >>>differ from single quotes ('), but if there is a discussion that
        >>>someone can point me to, that would be very nice.
        >>>>
        >>Enough of this waste of time already. Haven't you better things to do?
        >>>
        >>Case closed.
        >>>
        >>>
        >>
        >Yep, you obviously don't understand plain English.
        >>
        >"I'm learning PHP and MySQL. In the samples I work with, the SQL table
        >names are "escaped" in accent grave (`) marks, not in single or double
        >quotes.?"
        >>
        >That's his question - not single vs. double quotes.
        >>
        >You're right. Case closed.
        >>
        >>
        >
        Your assumption is clearly wrong.
        >
        Stoopid idiot. Can't even read plain English.

        Better go back to first grade.

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

        Comment

        • Rik Wasmus

          #19
          Re: MySQL table names in PHP code

          Jerry Stuckle wrote:
          Chuck Anderson wrote:
          >Jerry Stuckle wrote:
          >>Chuck Anderson wrote:
          >>>
          >>>Jerry Stuckle wrote:
          >>>>
          >>>>Chuck Anderson wrote:
          >>>>>
          >>>>>
          >>>>>MikeB wrote:
          >>>>>>
          >>>>>>I'm learning PHP and MySQL. In the samples I work with, the SQL
          >>>>>>table
          >>>>>>names are "escaped" in accent grave (`) marks, not in single or
          >>>>>>double
          >>>>>>quotes.
          >>>>>>>
          >>>>>>Can anyone explain that?
          >>>>>>>
          >>>>>>For instance, I have the following:
          >>>>>>>
          >>>>>>$sql_comm and = "SELECT * from `7-1_List`";
          >>>>>>>
          >>>>>>I tried looking around on the php.net site, but clearly I'm not
          >>>>>>using
          >>>>>>the right search terms.
          >>>>>>>
          >>>>>>While I'm asking, I think I've figured out how double quotes (")
          >>>>>>differ from single quotes ('), but if there is a discussion that
          >>>>>>someone can point me to, that would be very nice.
          >>>>>>>
          >>>>>Re: quotes - http://us.php.net/types.string
          >>>>>>
          >>>>>>
          >>>>Good try, but it has nothing to do with the user's question.
          >>>>>
          >>>His question (to quote) about "how double quotes (") differ from
          >>>single quotes (')?"
          >>>It's spot on, Jerry. Did you even bother to look? That page it has
          >>>a very thorough discussion of Variable parsing and how to use both
          >>>types.
          >>>>
          >>>>
          >>>B.S.
          >>>
          >>Read again. He was asking about back tickies (`) in MySQL
          >>statements, not single quotes (') in PHP.
          >>>
          >>It had absolutely nothing to do with PHP strings.
          >>
          >Du-uh ...... try again He spoke of both. Here I'll quote it for you
          >again:
          >>
          >>I'm learning PHP and MySQL ......
          >>
          >>..... While I'm asking, I think I've figured out how double quotes (")
          >>differ from single quotes ('), but if there is a discussion that
          >>someone can point me to, that would be very nice.
          >>
          >Enough of this waste of time already. Haven't you better things to do?
          >>
          >Case closed.
          >>
          >
          Yep, you obviously don't understand plain English.
          >
          "I'm learning PHP and MySQL. In the samples I work with, the SQL table
          names are "escaped" in accent grave (`) marks, not in single or double
          quotes.?"
          >
          That's his question - not single vs. double quotes.
          >
          You're right. Case closed.
          Erm, Jerry, it is possible the OP asked 2 (two, more then one) question
          in his post...
          --
          Rik Wasmus
          ....spamrun finished

          Comment

          • Jerry Stuckle

            #20
            Re: MySQL table names in PHP code

            Rik Wasmus wrote:
            Jerry Stuckle wrote:
            >Chuck Anderson wrote:
            >>Jerry Stuckle wrote:
            >>>Chuck Anderson wrote:
            >>>>
            >>>>Jerry Stuckle wrote:
            >>>>>
            >>>>>Chuck Anderson wrote:
            >>>>>>
            >>>>>>
            >>>>>>MikeB wrote:
            >>>>>>>
            >>>>>>>I'm learning PHP and MySQL. In the samples I work with, the SQL
            >>>>>>>table
            >>>>>>>names are "escaped" in accent grave (`) marks, not in single or
            >>>>>>>double
            >>>>>>>quotes .
            >>>>>>>>
            >>>>>>>Can anyone explain that?
            >>>>>>>>
            >>>>>>>For instance, I have the following:
            >>>>>>>>
            >>>>>>>$sql_com mand = "SELECT * from `7-1_List`";
            >>>>>>>>
            >>>>>>>I tried looking around on the php.net site, but clearly I'm not
            >>>>>>>using
            >>>>>>>the right search terms.
            >>>>>>>>
            >>>>>>>While I'm asking, I think I've figured out how double quotes (")
            >>>>>>>differ from single quotes ('), but if there is a discussion that
            >>>>>>>someon e can point me to, that would be very nice.
            >>>>>>>>
            >>>>>>Re: quotes - http://us.php.net/types.string
            >>>>>>>
            >>>>>>>
            >>>>>Good try, but it has nothing to do with the user's question.
            >>>>>>
            >>>>His question (to quote) about "how double quotes (") differ from
            >>>>single quotes (')?"
            >>>>It's spot on, Jerry. Did you even bother to look? That page it
            >>>>has a very thorough discussion of Variable parsing and how to use
            >>>>both types.
            >>>>>
            >>>>>
            >>>>B.S.
            >>>>
            >>>Read again. He was asking about back tickies (`) in MySQL
            >>>statements , not single quotes (') in PHP.
            >>>>
            >>>It had absolutely nothing to do with PHP strings.
            >>>
            >>Du-uh ...... try again He spoke of both. Here I'll quote it for you
            >>again:
            >>>
            >>>I'm learning PHP and MySQL ......
            >>>
            >>>..... While I'm asking, I think I've figured out how double quotes (")
            >>>differ from single quotes ('), but if there is a discussion that
            >>>someone can point me to, that would be very nice.
            >>>
            >>Enough of this waste of time already. Haven't you better things to do?
            >>>
            >>Case closed.
            >>>
            >>
            >Yep, you obviously don't understand plain English.
            >>
            >"I'm learning PHP and MySQL. In the samples I work with, the SQL table
            >names are "escaped" in accent grave (`) marks, not in single or double
            >quotes.?"
            >>
            >That's his question - not single vs. double quotes.
            >>
            >You're right. Case closed.
            >
            Erm, Jerry, it is possible the OP asked 2 (two, more then one) question
            in his post...
            Hi, Rik,

            Yes and no. His question was about the backticks. A side comment
            related to him having single vs. double quotes figured out (he thinks).

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

            Comment

            • Guillaume

              #21
              Re: MySQL table names in PHP code

              Jerry Stuckle a écrit :
              Yes and no. His question was about the backticks. A side comment
              related to him having single vs. double quotes figured out (he thinks).
              Whatever, just quit it, who cares actually ?
              At least the comment you consider as inappropriate is the most PHP
              oriented of this topic. Not such a big deal.

              Regards,
              --
              Guillaume

              Comment

              • Jerry Stuckle

                #22
                Re: MySQL table names in PHP code

                Guillaume wrote:
                Jerry Stuckle a écrit :
                >Yes and no. His question was about the backticks. A side comment
                >related to him having single vs. double quotes figured out (he thinks).
                >
                Whatever, just quit it, who cares actually ?
                At least the comment you consider as inappropriate is the most PHP
                oriented of this topic. Not such a big deal.
                >
                Regards,
                No, backticks in MySQL table names has nothing to do with PHP. They're
                not used by other databases, but the syntax is identical in other
                languages when calling MySQL.

                It has nothing to do with PHP - which is why it is not documented in the
                PHP manual (but it is in the MySQL manual - which should give you a hint).

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

                Comment

                • Guillaume

                  #23
                  Re: MySQL table names in PHP code

                  >the comment you consider as inappropriate
                  I was talking about Chuck's comment, which only concern was quotes vs
                  double quotes in PHP. Which indeed was the nearest to the NG subject,
                  though it may (or may not) be appropriate to the OP.

                  I mean, he would have said something not really exact, appropriate or
                  accurate, if OT then one could say "don't post if that's OT and possibly
                  useless".
                  While Chuck posted something that *may* be useless to the OP (depends on
                  what he really meant), but at least is related to the topic.

                  Regards,
                  --
                  Guillaume

                  Comment

                  • MikeB

                    #24
                    Re: MySQL table names in PHP code

                    Wow. OK, firstly thank you all for the polite way you answered my
                    first question while pointing out that it was also OT. Other forums
                    are not always so kind.

                    Since I didn't realize that the backticks were SQL, I guess I
                    conflated them with quotes and double quotes to some extent.

                    I did actually ask two questions, the first one about the backticks
                    and then a secondary and much less important question about the quotes
                    vs double quotes issue so that I could read up on those and make sure
                    my understanding of them were thorough.

                    So I appreciate the responses I got to both answers. Thank you all.

                    Comment

                    Working...