Re: Triggers and column names

2012-06-22 Thread Gael Martinez
om 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 > > Su

RE: Triggers and column names

2012-06-22 Thread Rick James
l?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 -0500, Gael Martinez >>>> > I'm getting that done today thru a large static trigger script and I > woul

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 wil

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 curso

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; > >a

Re: How to export data with column names?

2011-02-13 Thread chamila gayan
outfile.txt ~Chamila Gayan On Mon, Feb 14, 2011 at 11:15 AM, mos 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 utilit

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

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

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

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 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 understand the

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. http://pastebin.com/f5

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. --- DROP

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

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 other

Re: Cloning a table with different column names

2007-02-05 Thread Tim Johnson
t; run 'mysqldump --no-data ' 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 pe

Re: Cloning a table with different column names

2007-02-05 Thread Rolando Edwards
Here is something convoluted and sick ... run 'mysqldump --no-data ' 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) create t

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 <[EM

RE: Select where the column names are not fully known

2007-01-11 Thread Jerry Schwartz
mysql.com > 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

Re: Select where the column names are not fully known

2007-01-11 Thread Brent Baisley
007 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 names ba

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

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

2006-03-14 Thread Jake Peavy
; > > > Bonus marks for beginning the line with a # > > > > > > My attempt stalled as soon as I got one column of data in the result > set > > > with a row for each column of the target table. > > > > > > SELECT COLUMNS FROM INFORMATION_S

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

2006-03-14 Thread SGreen
t > > row rather having to hand type them as shown above? > > > > Bonus marks for beginning the line with a # > > > > My attempt stalled as soon as I got one column of data in the result set > > with a row for each column of the target table. > > >

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',

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

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

2006-03-06 Thread C.R.Vegelin
To: Sent: Monday, March 06, 2006 8:12 PM 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 col

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 in

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 th

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

'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 na

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 m

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. Defa

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

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: 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

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 (

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: 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 >

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 t

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? --

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

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: sel

RE: Standard of Column Names

2004-05-02 Thread Matt Chatterley
Message- > From: Ronan Lucio [mailto:[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

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 Serve

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

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: 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

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 Fo

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. D

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

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: SELECT into OUTFILE... Can I add column names?

2004-04-06 Thread David L. Van Brunt, Ph.D.
t; > 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

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

2004-04-06 Thread Paul DuBois
mode, 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

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

2004-04-06 Thread David L. Van Brunt, Ph.D.
oured 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 it with SELE

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&#x

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 & Developme

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 in the

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: 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 typ

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 typ

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 tab

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_

Qualifying column names in join output?

2004-01-05 Thread Jeremy Zawodny
1 row in set (0.08 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 bac

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

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` http://www.mysql.com/doc/

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 http://companion

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 wh

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 fields(4

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 c

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" <[EM

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 exec

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 [LIKE ...]; prosit Klaus --

Re: How can I select the column names?

2003-09-04 Thread Adam Hardy
stion. 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. Is

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 Li

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-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 resul

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 do I show column names in php?

2003-07-23 Thread Ow Mun Heng
ta_seek($l_results,0); 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?

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

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); } i

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: Column names

2003-01-18 Thread Paul DuBois
as a wildcard. Teddy, Teddy's Center: 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: Fr

Re: Column names

2003-01-18 Thread Octavian Rasnita
t; <[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: > In MySQL I know that I need to put the colu

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

RE: Column names

2003-01-17 Thread Jennifer Goodie
u 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 t

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: 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 alter

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 cal

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

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

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! > >-A

column names

2002-03-30 Thread Alex Behrens
Hey Guys, What is the command to display the names of all the columns in a table? -mysql Thanks! -Alex "Big Al" Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-

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-sof

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

RE: Change column names

2002-02-15 Thread [EMAIL PROTECTED]
Hi Mikaela, Just use "SELECT group_id AS g, time AS t FROM tbl_Groups" Simon Original Message: - From: Mikaela Holmberg [EMAIL PROTECTED] Date: Fri, 15 Feb 2002 10:19:07 +0100 To: [EMAIL PROTECTED] Subject: Change column names Hi there. Just recently I have

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 p

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 the

'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 de

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.

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: 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

  1   2   >