473,796 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL table names in PHP code

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_command = "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.

Thanks.
Jun 2 '08
23 1601
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
Jun 2 '08 #21
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.
js*******@attgl obal.net
=============== ===
Jun 2 '08 #22
>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
Jun 2 '08 #23
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.

Jun 2 '08 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3557
by: jacob nikom | last post by:
I would like to create data model for a group of stores. All stores in this group are very similar to each other, so it is natural to allocate one MySQL database per store. Each database is going to have very similar set of tables with content related to a particular store. Let's suppose each store has multiple departments which are also very similar to each other. In this case I would like to model the departments
0
3950
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
1
538
by: David | last post by:
Hi, I currently administer our MySQL db version 3.23.56 on a Linux Cobalt Qube server via an external fron-end piece of software. My Table Names have capital letters at the beginning, i.e. StockMovements, OrderLines..... We are now implementing a cross-over to a Windows Server 2003 machine. I have installed MySQL version 4.0.20a and initially it was stated as 4.0.20a-debug. I managed to find another piece of software to take it
1
1596
by: Neil Zanella | last post by:
Hello, Consider the following PostgreSQL or Oracle SQL DDL code: CREATE TABLE fooTable ( foo INTEGER, PRIMARY KEY (foo) ); CREATE TABLE barTable (
39
8433
by: Mairhtin O'Feannag | last post by:
Hello, I have a client (customer) who asked the question : "Why would I buy and use UDB, when MySql is free?" I had to say I was stunned. I have no experience with MySql, so I was left sort of stammering and sputtering, and managed to pull out something I heard a couple of years back - that there was no real transaction safety in MySql. In flight transactions could be lost.
39
3236
by: windandwaves | last post by:
Hi Folk I have to store up to eight boolean bits of information about an item in my database. e.g. with restaurant drive-through facility yellow windows
6
38531
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get through this without much trouble. Programming knowledge is not required. Index What is SQL? Why MySQL? Installing MySQL. Using the MySQL command line interface
39
5873
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
1
9592
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, Last year I got a chance to work with R&D team, which was working on DB scripts conversion.. Though there is migration tool available, it converts only tables and constraints.. Rest of things (stored procedures, functions).. we have to manually edit. That time, we face some interesting challenges.. I failed to document all of them, but whatever I can share with u.. I will try.. :) ...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9533
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10190
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10019
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5447
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.