473,378 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How do you create a database with a dash in the name?

I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil
Jul 19 '05 #1
14 16144
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


More information needed:

What database server are you using? (Assuming MySQL but you never know...)

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #2
Phil Powell wrote:
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;


If you are using MySQL, use:
create database `my-site`;

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 19 '05 #3
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


More information needed:

What database server are you using? (Assuming MySQL but you never know...)

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #4
Phil Powell wrote:
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;


If you are using MySQL, use:
create database `my-site`;

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 19 '05 #5
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


Assuming you mean MySQL...

More info:
http://www.mysql.com/doc/en/Legal_names.html

What difference does it make to not use a hyphen? I mean, if the client
*wants* it that way is one thing, but databases are very "back end" and
may not ever be actually seen by the client. Just omit the hyphen is my
suggestion.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #6
Phil Powell wrote:
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;


If you are using MySQL, use:
create database `my-site`;

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Jul 19 '05 #7
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


Assuming you mean MySQL...

More info:
http://www.mysql.com/doc/en/Legal_names.html

What difference does it make to not use a hyphen? I mean, if the client
*wants* it that way is one thing, but databases are very "back end" and
may not ever be actually seen by the client. Just omit the hyphen is my
suggestion.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #8
On Thu, 29 Jan 2004 09:54:11 -0800, Phil Powell wrote:
I have a client database in my db dev server environment I need to create,
but the client name contains a dash "-". This blows up upon attempting to
do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


Assuming you mean MySQL...

More info:
http://www.mysql.com/doc/en/Legal_names.html

What difference does it make to not use a hyphen? I mean, if the client
*wants* it that way is one thing, but databases are very "back end" and
may not ever be actually seen by the client. Just omit the hyphen is my
suggestion.

--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/

Jul 19 '05 #9

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.
Jul 19 '05 #10

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.
Jul 19 '05 #11

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.
Jul 19 '05 #12
"Shawn" <sh***@tsorlando.com> wrote in message news:<Wf******************@bignews3.bellsouth.net> ...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.

Actually I can't create any database much less a mySQL database with a
dash in it, so I gave up and had the sys admin literally make it for
me, with an underscore.

Phil
Jul 19 '05 #13
"Shawn" <sh***@tsorlando.com> wrote in message news:<Wf******************@bignews3.bellsouth.net> ...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.

Actually I can't create any database much less a mySQL database with a
dash in it, so I gave up and had the sys admin literally make it for
me, with an underscore.

Phil
Jul 19 '05 #14
"Shawn" <sh***@tsorlando.com> wrote in message news:<Wf******************@bignews3.bellsouth.net> ...
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
I have a client database in my db dev server environment I need to
create, but the client name contains a dash "-". This blows up upon
attempting to do

create database my-site;

How then do I create this database, simple as that?

Thanx
Phil


It may be like my server. I use CPanel and it appends the domainname to the
beginning of all databases created. e.g. domain_database.

So I would have to create a similar script to cause PHP to create a database
that added the underscore to the name with my domain before the underscore
on any db that I created.

Actually I can't create any database much less a mySQL database with a
dash in it, so I gave up and had the sys admin literally make it for
me, with an underscore.

Phil
Jul 19 '05 #15

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

Similar topics

2
by: Robert | last post by:
I need some help with formatting some text received from a database query. I am only selecting a single row per query so the formatting will only be performed on a single row. The rows I need to...
2
by: Wayne Pierce | last post by:
I have a small script with PHP that queries a MySQL database to pull out one row, where I want to be able to access each of the columns separately. I have tried several different variations and am...
5
by: Phil Powell | last post by:
I have a client database in my db dev server environment I need to create, but the client name contains a dash "-". This blows up upon attempting to do create database my-site; How then do I...
1
by: el_roachmeister | last post by:
How can I correct this error apart from eliminating the dash in United-Kingdom? Couldn't execute query 'SELECT * FROM United-Kingdom ORDER BY level DESC': You have an error in your SQL syntax....
0
by: Darin Browne | last post by:
I found the following email validation code in the newsgroup and it works great except it won't allow a dash in the name. I do not understand regular expressions so I'm unsure of how to fix it. ...
1
by: mats.broberg | last post by:
Dear all, I'm having a scientific text translated into the majority of western and eastern European languages* and have provided a small leaflet with typesetting rules for the translators. Some...
3
by: sujith.bolar | last post by:
This is IE issue only. Firefox and mozilla doe not have this problem. td cell in a table with a title which includes '-'(dash). If I add a dash between Time-Time. IE intrepets as new line os...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
5
by: bosko19 | last post by:
We have recently set up two SQL Server 2005 Standard Edition servers with database mirroring. The mirrors function and fail over without a problem, but the Database Mirroring Monitor Job fails...
0
by: =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= | last post by:
"C:\Python24\Lib\site-packages\MySQLdb\cursors.py", line 149, in Here it complains that it deals with the character U+2013, which is "EN DASH"; it complains that the encoding called "latin-1"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.