RE: Triggers and column names

2012-06-22 Thread Rick James
] Sent: Thursday, June 21, 2012 5:05 PM To: mysql Subject: Re: Triggers and column names 2012/06/21 17:06 -0500, Gael Martinez I'm getting that done today thru a large static trigger script and I would like something more dynamic... For that it is needful to look up the table

Re: Triggers and column names

2012-06-22 Thread Gael Martinez
to change from one invocation of the trigger to the next, so don't have the dynamic code inside the trigger. -Original Message- From: Hal?sz S?ndor [mailto:h...@tbbs.net] Sent: Thursday, June 21, 2012 5:05 PM To: mysql Subject: Re: Triggers and column names 2012/06/21 17:06

Triggers and column names

2012-06-21 Thread Gael Martinez
Hello there I'm trying to figure out an elegant way with Mysql 5.5.25 to log changes via a before change trigger to a table including the column name of the field that changed... How can I dynamically enumerate the field names and populate the field log into the t1_log test table ... Would a

Re: Triggers and column names

2012-06-21 Thread Hal�sz S�ndor
2012/06/21 17:06 -0500, Gael Martinez I'm getting that done today thru a large static trigger script and I would like something more dynamic... For that it is needful to look up the table in INFORMATION_SCHEMA.COLUMNS, and, yes, you can look up the field names--but then what will you do with

RE: How to export data with column names?

2011-02-14 Thread Jerry Schwartz
-Original Message- From: mos [mailto:mo...@fastmail.fm] Sent: Sunday, February 13, 2011 4:50 PM To: mysql@lists.mysql.com Subject: How to export data with column names? I want to use select * into outfile myfile.txt from table1; and have it export the data as tab delimited

How to export data with column names?

2011-02-13 Thread mos
I want to use select * into outfile myfile.txt from table1; and have it export the data as tab delimited but with the column names. I need the column names because the import utility will use that to create the table in another (non-MySQL) database. As it stands, I can't get the column

How to export data with column names?

2011-02-13 Thread mos
I want to use select * into outfile myfile.txt from table1; and have it export the data as tab delimited but with the column names. I need the column names because the import utility will use that to create the table in another (non-MySQL) database. As it stands, I can't get the column

Re: How to export data with column names?

2011-02-13 Thread chamila gayan
wrote: I want to use select * into outfile myfile.txt from table1; and have it export the data as tab delimited but with the column names. I need the column names because the import utility will use that to create the table in another (non-MySQL) database. As it stands, I can't get the column

RE: Natural Join Issue: column names are equal but doesn't work anyways

2009-08-25 Thread Gavin Towey
Hi Deviad, NATURAL JOIN uses all column names that are the same between both tables as conditions. select * from rappresentanti NATURAL JOIN clienti; is the same as: select * from rappresentanti r JOIN client c ON r.cognome=c.cognome AND r.nome=c.nome AND r.vita=c.vita AND r.citta=c.citta

Natural Join Issue: column names are equal but doesn't work anyways

2009-08-24 Thread Deviad
Hello, I have been training for a test on Database Design and MySQL. The following is inside a file we have to run before starting to code what the excercises require us to. Call the file as you wish and run it if it helps to understand the reason behind my problem. ---

Re: Natural Join Issue: column names are equal but doesn't work anyways

2009-08-24 Thread Deviad
Hi again, since I'm not someone who gives up easily, I have restyled that old code (actually is from an example back of my teacher into 2002, I saw that she changed a bit her way to code this stuff), I restyled the code just to be sure it isn't some parsing issue or whatever.

Re: Natural Join Issue: column names are equal but doesn't work anyways

2009-08-24 Thread muhammad subair
On Tue, Aug 25, 2009 at 6:55 AM, Deviad dev...@msn.com wrote: Hello, I have been training for a test on Database Design and MySQL. The following is inside a file we have to run before starting to code what the excercises require us to. Call the file as you wish and run it if it helps to

How do you reference custom column names

2007-06-19 Thread Scott Haneda
SELECT 1+1 as foo, 2 as bar, foo+bar This will not work, but I think you can see what I am trying to do. I need to run a pretty hefty update on a database, and there are some pretty heavy calculations I will be doing. The result of many of those, needs to be further used to make updates on

Re: How do you reference custom column names

2007-06-19 Thread Dan Nelson
In the last episode (Jun 19), Scott Haneda said: SELECT 1+1 as foo, 2 as bar, foo+bar This will not work, but I think you can see what I am trying to do. I need to run a pretty hefty update on a database, and there are some pretty heavy calculations I will be doing. The result of many of

Cloning a table with different column names

2007-02-05 Thread Tim Johnson
Hello: I have a need to create two tables from imported data. The only difference between the tables is the column names. The data will be the same. Can anyone propose a mysql method to create a new table from an existing table with new column names? thanks tim -- Tim Johnson [EMAIL PROTECTED

Re: Cloning a table with different column names

2007-02-05 Thread Rolando Edwards
Here is something convoluted and sick ... run 'mysqldump --no-data database table-name' and redirect to a text file. change the table name and column names in the text file as desired (using perl) run mysql client redirect input from the text file Something with more dignity (and no perl

Re: Cloning a table with different column names

2007-02-05 Thread Tim Johnson
'mysqldump --no-data database table-name' and redirect to a text file. change the table name and column names in the text file as desired (using perl) run mysql client redirect input from the text file Something with more dignity (and no perl) Perl = no dignity? My biz partner likes perl

Select where the column names are not fully known

2007-01-11 Thread andy.lawton
We have a logging package that logs data into a table. Part of the data that is logged are elements of a vector. A logging application automatically takes out the elemets of the vector and automatically creates column names based on it's name and the element. This data will be mixed in with lots

Re: Select where the column names are not fully known

2007-01-11 Thread Brent Baisley
11, 2007 5:00 AM Subject: Select where the column names are not fully known We have a logging package that logs data into a table. Part of the data that is logged are elements of a vector. A logging application automatically takes out the elemets of the vector and automatically creates column

RE: Select where the column names are not fully known

2007-01-11 Thread Jerry Schwartz
the column names are not fully known We have a logging package that logs data into a table. Part of the data that is logged are elements of a vector. A logging application automatically takes out the elemets of the vector and automatically creates column names based on it's name and the element

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread Jake Peavy
On 3/10/06, Jake Peavy [EMAIL PROTECTED] wrote: On 3/7/06, C.R.Vegelin [EMAIL PROTECTED] wrote: Hi Ariel, Maybe this example helps you to create CSV output from MySQL. The first SELECT generates the headerline; the second the data. ( SELECT 'FieldA','FieldB','FieldC', ... ) UNION

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread SGreen
Nobody has any ideas at all? (sheds solitary tear) -jp Nope, no suggestions. You are mixing purposes (not to mention data types) when you add column names to the output of INTO OUTFILE. Have you looked at using the CSV storage engine or mysqldump as alternatives? Shawn Green Database

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread Jake Peavy
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 'testtable' Ideas? TIA, -jp Nobody has any ideas at all? (sheds solitary tear) -jp Nope, no suggestions. You are mixing purposes (not to mention data types) when you add column names to the output of INTO OUTFILE

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-10 Thread Jake Peavy
On 3/7/06, C.R.Vegelin [EMAIL PROTECTED] wrote: Hi Ariel, Maybe this example helps you to create CSV output from MySQL. The first SELECT generates the headerline; the second the data. ( SELECT 'FieldA','FieldB','FieldC', ... ) UNION ( SELECT `FieldA`, `FieldB`, `FieldC`, ... INTO OUTFILE

'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Ariel Sánchez Mora
When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in the .csv Anyone know how to include the column names, table name

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread SGreen
Ariel Sánchez Mora [EMAIL PROTECTED] wrote on 03/06/2006 03:12:20 PM: When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Paul DuBois
At 14:12 -0600 3/6/06, Ariel Sánchez Mora wrote: When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in the .csv Anyone

RE: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Marciano [Intercol]
, 2006 5:12 PM To: mysql@lists.mysql.com Subject: 'Into outfile' doesn't include the column names. How can it be done? When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread C.R.Vegelin
' doesn't include the column names. How can it be done? When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in the .csv

Re: Replication stops on ALTER TABLE ; keep on getting duplicate column names

2005-08-01 Thread Gleb Paharenko
Hello. Check the structure of `bartran` table on the slave. You master is very old, upgrade to the latest release (4.1.13 or 4.0.25). Dear All, Here's our setup : Master : MySQL v4.0.16-max-log Slave : MySQL v4.1.10a-max-log Everytime I do an ALTER TABLE on the master

Replication stops on ALTER TABLE ; keep on getting duplicate column names

2005-07-31 Thread Sinang, Danny
Dear All, Here's our setup : Master : MySQL v4.0.16-max-log Slave : MySQL v4.1.10a-max-log Everytime I do an ALTER TABLE on the master server, I get the following error message on the slave server. 050723 1:51:26 [ERROR] Slave: Error 'Duplicate column name 'TimefileDate'' on query.

Ambiguous column names in derived table

2005-07-11 Thread Richard Cyganiak
Hi, Suppose I have two tables Tbl1 and Tbl2. Both have a column called A. MySQL 5.0.7 rejects this query as ambiguous: SELECT A from Tbl1, Tbl2; But it accepts this and returns the A column from Tbl1: SELECT A FROM (SELECT * FROM Tbl1, Tbl2) AS foo; But this query is rejected again: SELECT

Re: Ambiguous column names in derived table

2005-07-11 Thread Gleb Paharenko
Hello. It seems a bug for me. Any columns in the subquery select list must have unique names according to: http://dev.mysq.com/doc/mysql/en/unnamed-views.html I've reported a bug. You could add your comments at: http://bugs.mysql.com/bug.php?id=11864 Richard Cyganiak [EMAIL

unions will full column names won't work in 4.1.7

2004-12-15 Thread Kevin A. Burton
Not sure if this is a bug... probably should be. On 4.1.18 I can run: (SELECT * FROM FOO WHERE ID = 1) UNION (SELECT * FROM FOO WHERE ID = 2) ORDER BY FOO.COL_A Which will work just fine However when I use this query on 4.1.7 I get ERROR 1250 (42000): Table 'ARTICLE' from one of the SELECTs cannot

Re: unions will full column names won't work in 4.1.7

2004-12-15 Thread Paul DuBois
At 16:23 -0800 12/15/04, Kevin A. Burton wrote: Not sure if this is a bug... probably should be. On 4.1.18 I can run: 4.1.18? I assume you mean 4.0.18. Anyway, what you describe is according to the documentation: http://dev.mysql.com/doc/mysql/en/UNION.html (SELECT * FROM FOO WHERE ID = 1) UNION

Re: unions will full column names won't work in 4.1.7

2004-12-15 Thread Rhino
- Original Message - From: Kevin A. Burton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 7:23 PM Subject: unions will full column names won't work in 4.1.7 Not sure if this is a bug... probably should be. On 4.1.18 I can run: (SELECT * FROM FOO WHERE

MySQL 4.1 table/column names in UTF8

2004-10-26 Thread Brian Mansell
From http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html : # Important note: MySQL 4.1 stores table names and column names in UTF8. If you have table names or column names that use characters outside of the range from `A' to `Z', you may have to do a mysqldump of your tables in MySQL 4.0

Re: MySQL 4.1 table/column names in UTF8

2004-10-26 Thread Jim Winstead
On Tue, Oct 26, 2004 at 01:03:22PM -0700, Brian Mansell wrote: From http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html : # Important note: MySQL 4.1 stores table names and column names in UTF8. If you have table names or column names that use characters outside of the range from

selects with wildcards for field/column names

2004-07-30 Thread Jason Joines
Is it possible to use a wildcard for field names in a select? For instance if I have a table with a hundred columns and I want to retrieve all rows who have a certain value in any column but don't want to type in a hundred column names in my query, how do I do it? I've tried: select * from

Re: selects with wildcards for field/column names

2004-07-30 Thread gerald_clark
Jason Joines wrote: Is it possible to use a wildcard for field names in a select? No. For instance if I have a table with a hundred columns and I want to retrieve all rows who have a certain value in any column but don't want to type in a hundred column names in my query, how do I do

Re: selects with wildcards for field/column names

2004-07-30 Thread Harald Fuchs
In article [EMAIL PROTECTED], Jason Joines [EMAIL PROTECTED] writes: Is it possible to use a wildcard for field names in a select? Nope. For instance if I have a table with a hundred columns... ... then you have probably a broken DB design. What are you trying to do? -- MySQL

RE: Standard of Column Names

2004-05-02 Thread Matt Chatterley
:[EMAIL PROTECTED] Sent: 27 April 2004 15:46 To: [EMAIL PROTECTED] Subject: Standard of Column Names Hello, I´m doing the planing for an application that will use MySQL as database. So, I´d like to know your opinions about the standard for the column names. Supposing that I should

column names in select

2004-04-28 Thread Tom Roos
'lo is it possible to suppress (i.e. not display) the column names from the resultset of a select statement? if so, how? tks tom Disclaimer http://www.shoprite.co.za/disclaimer.html

Re: column names in select

2004-04-28 Thread Egor Egorov
Tom Roos [EMAIL PROTECTED] wrote: is it possible to suppress (i.e. not display) the column names from the resultset of a select statement? if so, how? For command-line mysql client use --skip-column-names (-N) option: http://dev.mysql.com/doc/mysql/en/mysql.html -- For technical

Re: column names in select

2004-04-28 Thread Martijn Tonies
is it possible to suppress (i.e. not display) the column names from the resultset of a select statement? if so, how? What about only selecting the columns you need? With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server. Upscene

Standard of Column Names

2004-04-27 Thread Ronan Lucio
Hello, I´m doing the planing for an application that will use MySQL as database. So, I´d like to know your opinions about the standard for the column names. Supposing that I should create a table named car. Is it better to have either the column names (cod, name, description) or (car_cod

Re: Standard of Column Names

2004-04-27 Thread Ruslan U. Zakirov
Ronan Lucio wrote: Hello, I´m doing the planing for an application that will use MySQL as database. So, I´d like to know your opinions about the standard for the column names. Supposing that I should create a table named car. Is it better to have either the column names (cod, name, description

Re: Standard of Column Names

2004-04-27 Thread Ronan Lucio
Ruslan, IMHO: 1) Table name as prefix is unnecessary for me. It's norwegian notation which I hate. 2) Also I recomend look into ANSI SQL standard for reserved keywords. I've got experience of porting DB from MySQL(allow some keywords) to another DB, it's pain. Thank you your answer. Do you

Re: Standard of Column Names

2004-04-27 Thread Ronan Lucio
Harald, I don't see the necessity of the latter naming scheme since SELECT cod, name, description FROM car can also be written as SELECT car.cod, car.name, car.description FROM car Do you know how it would be about portability? Thanks, Ronan -- MySQL General Mailing List For list

Re: Standard of Column Names

2004-04-27 Thread Michael Stassen
Harald Fuchs wrote: In article [EMAIL PROTECTED], Ronan Lucio [EMAIL PROTECTED] writes: Hello, I´m doing the planing for an application that will use MySQL as database. So, I´d like to know your opinions about the standard for the column names. Supposing that I should create a table named

SELECT into OUTFILE... Can I add column names?

2004-04-06 Thread David L. Van Brunt, Ph.D.
I've scoured the online documentation, and I have a good SELECT into OUTFILE query that gives me what I want... Except that there is no 1st row with column names. Hoping I missed something obvious... Any pointers on this one? -- David L. Van Brunt, Ph.D. Outlier Consulting Development mailto

Re: SELECT into OUTFILE... Can I add column names?

2004-04-06 Thread Paul DuBois
At 20:43 -0500 4/6/04, David L. Van Brunt, Ph.D. wrote: I've scoured the online documentation, and I have a good SELECT into OUTFILE query that gives me what I want... Except that there is no 1st row with column names. Hoping I missed something obvious... Any pointers on this one? You can't do

Re: SELECT into OUTFILE... Can I add column names?

2004-04-06 Thread David L. Van Brunt, Ph.D.
a good SELECT into OUTFILE query that gives me what I want... Except that there is no 1st row with column names. Hoping I missed something obvious... Any pointers on this one? You can't do it with SELECT ... INTO OUTFILE. -- David L. Van Brunt, Ph.D. Outlier Consulting Development mailto

Re: SELECT into OUTFILE... Can I add column names?

2004-04-06 Thread Paul DuBois
, you get this kind of output: mysql select 1, 2, 3; +---+---+---+ | 1 | 2 | 3 | +---+---+---+ | 1 | 2 | 3 | +---+---+---+ 1 row in set (0.05 sec) In batch mode, you get this kind of output: % echo select 1, 2, 3 | mysql 1 2 3 1 2 3 The first row is the column names

Re: SELECT into OUTFILE... Can I add column names?

2004-04-06 Thread David L. Van Brunt, Ph.D.
| +---+---+---+ | 1 | 2 | 3 | +---+---+---+ 1 row in set (0.05 sec) In batch mode, you get this kind of output: % echo select 1, 2, 3 | mysql 1 2 3 1 2 3 The first row is the column names. The following rows will be the data. Those are tabs between the columns. On 4/6

selecting rows from several tables with same column names BUT not joined

2004-03-06 Thread Mark Beauman
I have 15 tables, all with the same column names (but different values) where i want to SELECT all rows over all tables but not to JOIN. Is there a way i can do this? I am sure I am missing something simple but cannot seem to find the answer in the manual, forums. Furthermore i want to read

Re: selecting rows from several tables with same column names BUT not joined

2004-03-06 Thread Paul DuBois
At 12:57 +1100 3/7/04, Mark Beauman wrote: I have 15 tables, all with the same column names (but different values) where i want to SELECT all rows over all tables but not to JOIN. Is there a way i can do this? I am sure I am missing something simple but cannot seem to find the answer

Re: Prefixing Column Names in Select

2004-02-19 Thread James E Hicks III
On Wednesday 18 February 2004 09:24 pm, Ligaya Turmelle wrote: You can set it as an alias using AS . Respectfully, Ligaya Turmelle Yes, I was aware of this option, but I was looking for a way to automatically alias all fields with a set prefix or postfix. On a big table it's a lot of typing

Re: Prefixing Column Names in Select

2004-02-19 Thread James E Hicks III
On Wednesday 18 February 2004 09:24 pm, Ligaya Turmelle wrote: You can set it as an alias using AS . Respectfully, Ligaya Turmelle Yes, I was aware of this option, but I was looking for a way to automatically alias all fields with a set prefix or postfix. On a big table it's a lot of typing

Prefixing Column Names in Select

2004-02-18 Thread James E Hicks III
Isn't there a way to prefix (or postfix) a tables column names in the results of a select. For example I have a table named from_address. This table has the column names line1,line2,line3,line4,line5. When I do a select query on from_address I want all columns to return as from_line1

Re: Prefixing Column Names in Select

2004-02-18 Thread Ligaya Turmelle
You can set it as an alias using AS . Respectfully, Ligaya Turmelle James E Hicks III [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Isn't there a way to prefix (or postfix) a tables column names in the results of a select. For example I have a table named from_address. This table

Qualifying column names in join output?

2004-01-05 Thread Jeremy Zawodny
sec) mysql select * from t1, t2; +--+--+--+--+ | one | two | one | two | +--+--+--+--+ |1 |2 |1 |2 | +--+--+--+--+ 1 row in set (0.08 sec) Is there a way to make MySQL spit back the column names

question about column names

2003-11-22 Thread joffrey leevy
Hi all: How does one get away with creating a column name that is more than one word -let's say a column named John Smith? I know John_Smith is an option but I'd like two separate words. Thanks J __ Do you Yahoo!? Free Pop-Up Blocker - Get it now

Re: question about column names

2003-11-22 Thread Paul DuBois
At 18:09 -0800 11/22/03, joffrey leevy wrote: Hi all: How does one get away with creating a column name that is more than one word -let's say a column named John Smith? I know John_Smith is an option but I'd like two separate words. Quote it with backticks: `John Smith`

RE: question about column names

2003-11-22 Thread Chris
you could try encasing the name with backticks: CREATE TABLE `My Table`(`My Column` INT); -Original Message- From: joffrey leevy [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 6:09 PM To: [EMAIL PROTECTED] Subject: question about column names Hi all: How does one get

How to query mySQL in java without using actual column names? but using something like field(0),field(1) etc.,

2003-11-08 Thread karthikeyan
I have a table with about 100 column with different column name. It is difficult to remember all the field names. But I know the last few columns are very important for query and used frequently. For example: Table with fields weight_42(double),width_43(double),height_44(double) where the

Re: How to query mySQL in java without using actual column names? but using something like field(0),field(1) etc.,

2003-11-08 Thread Paul DuBois
. That will give you the appropriate column names. Seems like a lot of work just to avoid knowing the column names. :-) For example: Table with fields weight_42(double),width_43(double),height_44(double) where the fields(42), field(43) and field(44) respectively mysql select * from data_base where weight_42

Reading a table without knowing column names

2003-09-24 Thread Philippe MAIRE
Hi I would like to execute a select on a table for which i don't know the column names. IE I would like a command like select column(1) from table where ... Sure, if I ask, it is because I cannot use the desc command. I have another solution which causes again a problem : if I could execute

Re: Reading a table without knowing column names

2003-09-24 Thread Director General: NEFACOMP
I think by issuing a SELECT * FROM tblTableName will execute your query without knowing the column names. But you can also issue a SHOW FIELDS FROM tblTableName to get a list of the table columns. Hope this helps, Thanks Emery - Original Message - From: Philippe MAIRE [EMAIL PROTECTED

Re: Reading a table without knowing column names

2003-09-24 Thread Paul DuBois
At 19:33 +0200 9/24/03, Philippe MAIRE wrote: Hi I would like to execute a select on a table for which i don't know the column names. IE I would like a command like select column(1) from table where ... Sure, if I ask, it is because I cannot use the desc command. You can use SELECT but you cannot

AW: How can I select the column names?

2003-09-05 Thread Franz, Fa. PostDirekt MA
Hi, I am trying to select the column names from a table to be displayed in a web page. Is there anyway to select column names without desc? I don't now, if it makes a difference to 'DESCRIBE' but you can do: SHOW COLUMNS FROM TABL_NAME [LIKE ...]; prosit Klaus -- MySQL General

RE: How can I select the column names?

2003-09-04 Thread Fortuno, Adam
I don't follow your question. Please elaborate. Cheers, Adam -Original Message- From: Jake Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2003 1:46 AM To: Mysql Subject: How can I select the column names? I am trying to select the column names from a table

Re: How can I select the column names?

2003-09-04 Thread Chris Boget
I am trying to select the column names from a table to be displayed in a web page. Is there anyway to select column names without desc? If you are using PHP, you can look at the following: http://us4.php.net/manual/en/function.mysql-field-name.php Chris -- MySQL General Mailing List

Re: How can I select the column names?

2003-09-04 Thread Adam Hardy
. Please elaborate. Cheers, Adam -Original Message- From: Jake Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2003 1:46 AM To: Mysql Subject: How can I select the column names? I am trying to select the column names from a table to be displayed in a web page

How can I select the column names?

2003-09-03 Thread Jake Johnson
I am trying to select the column names from a table to be displayed in a web page. Is there anyway to select column names without desc? Thanks, Jake Johnson [EMAIL PROTECTED] __ Plutoid - http://www.plutoid.com - Shop Plutoid

Re: How can I select the column names?

2003-09-03 Thread Paul DuBois
At 22:45 -0700 9/2/03, Jake Johnson wrote: I am trying to select the column names from a table to be displayed in a web page. Is there anyway to select column names without desc? What's wrong with using DESCRIBE? You could issue SELECT * FROM tbl_name WHERE 0 and then examine the result set

How do I show column names in php?

2003-07-23 Thread Jake Johnson
I am using php and mysql and I want to show the column names. How do I go about doing this without hardcoding the headers in my php? Regards, Jake Johnson [EMAIL PROTECTED] __ Plutoid - http://www.plutoid.com - Shop Plutoid

Re: How do I show column names in php?

2003-07-23 Thread Yves Goergen
you want to show the column names of WHAT? if you want to get those of a previous SELECT..., there's a special function for that. here's some code from my mysql admin module: $fields = array(); while ($meta = mysql_fetch_field($result)) { array_push($fields, $meta-name); } if you want

Re: How do I show column names in php?

2003-07-23 Thread Jackson Miller
Try: $result = mysql_query(SHOW COLUMNS FROM table_name); while ($row = mysql_fetch_array($result)) { foreach ($row as $key=value) { echo $key = $value; } } -Jackson On Wednesday 23 July 2003 9:32, Jake Johnson wrote: I am using php and mysql and I want to show the column names

RE: How do I show column names in php?

2003-07-23 Thread Ow Mun Heng
); Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Jackson Miller [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 10:56 PM To: Jake Johnson; Mysql Subject: Re: How do I show column names in php? Try: $result = mysql_query(SHOW

Re: Column names

2003-01-18 Thread Octavian Rasnita
] To: MySQL [EMAIL PROTECTED] Cc: Octavian Rasnita [EMAIL PROTECTED] Sent: Friday, January 17, 2003 8:31 PM Subject: Re: Column names On 17 Jan 2003, at 16:40, Octavian Rasnita wrote: In MySQL I know that I need to put the column names between `` in some cases if they contain a % or an _ sign

Re: Column names

2003-01-18 Thread Paul DuBois
: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Keith C. Ivey [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Cc: Octavian Rasnita [EMAIL PROTECTED] Sent: Friday, January 17, 2003 8:31 PM Subject: Re: Column names On 17 Jan 2003, at 16:40, Octavian Rasnita wrote

Column names

2003-01-17 Thread Octavian Rasnita
Hi all, In MySQL I know that I need to put the column names between `` in some cases if they contain a % or an _ sign in it. Please tell me what sign can I use to link 2 words in a column without needing to include that column name between ``. Can I use a - (dash) sign, or it might be considered

RE: Column names

2003-01-17 Thread Jennifer Goodie
are importing an old application into MySQL and need to use '-', you must escape it with `. -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 6:41 AM To: MySQL Subject: Column names Hi all, In MySQL I know that I need to put the column names

Re: Column names

2003-01-17 Thread Keith C. Ivey
On 17 Jan 2003, at 16:40, Octavian Rasnita wrote: In MySQL I know that I need to put the column names between `` in some cases if they contain a % or an _ sign in it. Please tell me what sign can I use to link 2 words in a column without needing to include that column name between ``. Can

mysql query: left join with same column names

2002-07-04 Thread Wilbert Enserink
Hi all, I have to tables A and B. They boyh have a column with the same name. Now, I wrote this MySQL statement performing a left join. This results in a data set with rows consisting of 2 columns of the same name, in which the date is stored when the record was last altered. This column is

Re: mysql query: left join with same column names

2002-07-04 Thread Roger Baklund
* Wilbert Enserink I have to tables A and B. They boyh have a column with the same name. Now, I wrote this MySQL statement performing a left join. This results in a data set with rows consisting of 2 columns of the same name, in which the date is stored when the record was last altered.

Column names that contain %

2002-05-31 Thread David Adam
I have a table that includes numerous column names of the form '%_Dry_Weight' -- that is, they start with a percent sign. I am unable to query these columns, as mysql returns a you have an error in your SQL syntax' message. When I try to escape the % character with a backslash, the error

Re: Column names that contain %

2002-05-31 Thread Dan Nelson
In the last episode (May 31), David Adam said: I have a table that includes numerous column names of the form '%_Dry_Weight' -- that is, they start with a percent sign. I am unable to query these columns, as mysql returns a you have an error in your SQL syntax' message. When I try

Re: column names

2002-03-30 Thread Paul DuBois
At 0:06 -0600 3/31/02, Alex Behrens wrote: Hey Guys, What is the command to display the names of all the columns in a table? SHOW COLUMNS FROM tbl_name; DESCRIBE tbl_name; EXPLAIN tbl_name; They're described in the manual. -mysql Thanks! -Alex Big

Table Qualified Column Names

2002-03-06 Thread Dave Ford
Does mysql jdbc driver support table quailified column names? For example, this seems to work: select id from people But this doesn't: select people.id from people. Thanks. Dave Ford Smart Soft - The Developer Training Company http://www.smart-soft.com

Change column names

2002-02-15 Thread Mikaela Holmberg
Hi there. Just recently I have started to investigate a possible future use of mySql at my company. As part of this investigation I have come across one seemingly trivial obstacle, but an obstacle very important for me. What I wonder is if there is no means of renaming a column in a sql select

Re: Change column names

2002-02-15 Thread Joseph Bueno
Mikaela Holmberg a écrit : Hi there. Just recently I have started to investigate a possible future use of mySql at my company. As part of this investigation I have come across one seemingly trivial obstacle, but an obstacle very important for me. What I wonder is if there is no means of

'desc' and column names

2002-02-01 Thread vinko
Description: If you create a table with a column name called 'desc' (as the command, that is, without the '') mysql allows to create it, but then you can't query or do any operation with it, always giving an error like: You have an error in your SQL syntax near

Re: 'desc' and column names

2002-02-01 Thread Gerald Clark
'desc' is a reserved word. If you insist on using it for a field name, enclose it in back-ticks: `desc` [EMAIL PROTECTED] wrote: Description: If you create a table with a column name called 'desc' (as the command, that is, without the '') mysql allows to create it, but then you

selecting column names into rows of another table

2002-01-23 Thread mike vogel
i want to select the column names from one table into the rows of another. is this possible? thanks in advance! -kp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

Re: selecting column names into rows of another table

2002-01-23 Thread Paul DuBois
At 13:22 -0800 1/23/02, mike vogel wrote: i want to select the column names from one table into the rows of another. is this possible? thanks in advance! Using nothing but SQL, no. Using SQL within a program, yes. -kp

Column Names

2002-01-07 Thread Sparta Cruz
MySQL's Documentation: A name may start with any character that is legal in a name. In particular, a name may start with a number (this differs from many other database systems!). However, a name cannot consist only of numbers. MyQuestion: Why can't a column name be just a number? For example:

RE: Column Names

2002-01-07 Thread Matthew Smith
What would SELECT 42 FROM SOME_TABLE return? column name 42 or the numerical value 42 ? M -Original Message- From: Sparta Cruz [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 08:23 To: MySQL Subject: Column Names MySQL's Documentation: A name may start with any character

FOLLOW UP on column names not liked by odbc/php/access

2001-12-05 Thread mweb
Hello, On the same database, this query works: $SQL_Exec_String = INSERT INTO Multimedia (Titolo,Descrizione,Logo,Link) VALUES ('prova titolo','prova descrizione','.gif','prova link');; $cur= odbc_exec( $cnx, $SQL_Exec_String ); This one gives this error: ISQL_exec_String = Insert Into

  1   2   >