473,372 Members | 1,009 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,372 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 17 '05 #1
5 2423
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
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...
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....
14
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
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...
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"...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.