473,513 Members | 2,684 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 17 '05 #1
5 2427
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 17 '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 17 '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


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 17 '05 #4

"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 17 '05 #5
"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 17 '05 #6

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

Similar topics

2
4348
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
3481
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...
1
3448
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....
14
16157
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...
0
1203
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
1464
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
1693
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
12415
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...
0
2319
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"...
0
7257
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,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7521
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...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
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...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.