Does mySQL not like dashes or something? I seem to be getting the
following error:
"Unknown column 'etrans' in 'where clause'"
when I do the following query:
SELECT * from expense where etrans-num > 25
If I try:
SELECT * from expense where expense.'etrans-num' > 25
I get:
"You have an error in your SQL syntax, Check the manual that
corresponds to your MySQL version for the right syntax to use near
"etrans-num' > 25' at line 1
What's wrong with using dashes in field names?????
PW 1 1477
PW Herman wrote: What's wrong with using dashes in field names?????
They're too easily confused with the subtraction operator.
FWIW, I can't think of a single programming language that permits dashes
in identifiers.
MySQL uses backticks `` as an identifier delimiter, if you need special
characters, spaces, reserved words, etc. in your field names.
Try this:
SELECT * from expense where expense.`etrans-num` > 25
Regards,
Bill K. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lenz Grimmer |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
MySQL 4.0.14, a new version of the popular Open Source/Free Software
Database, has been released. It is now available in source and binary form
for a number of platforms from our download pages at
http://www.mysql.com/downloads/ and mirror sites.
|
by: Murphy |
last post by:
I am currently migrating a db from SQL Server & MySQL and ? (front end yet
to be decided upon) As I familiarise myself with MySQL populating tables
etc can be quite clumbersome. After reading the MySQL site it appears the
"Query Browser" is the correct tool which I've downloaded, extracted and
followed the instruction for installing it... without success, it doesn't
work.
To clarify what I've done I've:
Downloaded:...
|
by: MBS |
last post by:
Yeah, read the previous posts...I did that. None answer my question.
I just installed PHP 5.0.4, Apache 2.0.54, and MySQL 4.1.13 a few days ago
on WinXP SP2. My goal is to learn to use these programs.
I cannot, absolutely cannot connect to MySQL using PHP. I've tried
everything possible including the mysqli functions.
I have no idea what is wrong. I don't get any error messages at all. It's
almost as if PHP stops processing the...
|
by: jlee |
last post by:
I'm pretty much a newbie on mysql, and I need some help.
I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4
(i386) on a server hosting an active website.
The site's developer uses his own php shopping cart to receive customer
orders.
The configuration was done via cPanel with no external modifications -
which produced no protests when built, ran and connected with no
|
by: taras.di |
last post by:
Hi everyone,
I've come across an extremely strange problem. The exact same query in
both mysql command line client, and mysql query browser gives entirely
different results. I was hoping someone out there could shed some
light.
Ok, the query (I've stripped it bare, the real query is a bit more
complex)...
| |
by: bshumsky06 |
last post by:
Hi,
I am trying to create stored procedures in MySQL. Does anyone have a
suggestion on a good IDE to use. I have been working with the MySQL
Query Browser but it generates errors very often and is shut down by
Windows. When I make changes to my procedure, it doesn't seem to
always change what is being executed. Furthermore, sometimes the
procedure just disappears from my database. I am starting to think
that the stored procedure...
|
by: Flic |
last post by:
Hi,
I have a basic db that I access with MySQL query browser. Everything
seems fine to me but I am using this db as part of a php shopping
basket and when I try to add an item I get:
Notice: Query failed: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '>function.extract]: First argument should be an
array in functions.inc.php on line 31
|
by: Einstein30000 |
last post by:
Hi,
in one of my php-scripts is the following query (with an already open
db-connection):
$q = "INSERT INTO main (name, img, descr, from, size, format, cat,
host, link, date) VALUES ('$name', '$img', '$descr', '$user', '$size',
'$format', '$cat', '$host', '$link', '$date')" or die(mysql_error());
And when the query gets executed i get back the following error:
|
by: Atli |
last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t.
In situations where your PHP application needs to store entire files, the preferred method is to save the file onto the server’s file-system, and store the physical location of the file in your database. This is generally considered to be the easiest and fastest way to store files.
...
|
by: Caffeneide |
last post by:
I'm using a php script which performs three xml queries to other three
servers to retrieve a set of ids and after I do a query to mysql of
the kind
SELECT * FROM table WHERE id IN ('set of ids');
Although I'm sure the connection to the database is ok, I sometimes
get an error of this kind:
*Warning*: mysql_fetch_object(): supplied argument is not a valid
MySQL result resource in ...
This does not happen every time i run the script, only...
|
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,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |