Re: Urgent!!!

From: Date: Thu, 03 Jan 2002 22:25:11 +0000
Subject: Re: Urgent!!!
References: 1 2 3 4 5 6 7  Groups: php.db 
Request: Send a blank email to php-db+get-15368@lists.php.net to get a copy of this message
select substring_index(date_record,"-",1)+id as sum from test order by sum -- Best regards, George Nicolae IT Manager ___________________ X-Playin - Professional Web Design www.x-playin.f2s.com "Thomas "Omega" Henning" <tomi@mediasoft.ro> wrote in message news:20020103195157.93610.qmail@pb1.pair.com... > My date is like YYYY-MM-DD > as to the select you posted that selects only those to i need it ordered by > the sum of these to fields > > Thomas "omega" Henning > > "George Nicolae" <geomasterweb@hotmail.com> wrote in message > news:20020103151310.15250.qmail@pb1.pair.com... > > I have some idea about your problem but to solve I need some information. > > 1. you have a datatime, data, timestamp,time or year column? > > > > if you have a data type column with yyyy-mm-dd format you can use the > > following query > > > > select substring_index(date_record,"-",1)+id from test > > > > date_record is a date column > > id is an integer column > > > > -- > > > > > > Best regards, > > George Nicolae > > IT Manager > > ___________________ > > X-Playin - Professional Web Design > > www.x-playin.f2s.com > > > > > > > > "Thomas "Omega" Henning" <tomi@mediasoft.ro> wrote in message > > news:20020103120458.5978.qmail@pb1.pair.com... > > > Sorry but I don't have the query done yet . But maybe later I will have > it > > > done but I don't know how to use the substr command in mySQL . If you > tell > > > me how to use it I will post it on the forum. > > > > > > Thomas "omega" Henning > > > "George Nicolae" <geomasterweb@hotmail.com> wrote in message > > > news:20020103084431.23678.qmail@pb1.pair.com... > > > > and who looks the query with "substr the date so i get only the year"? > > > Type > > > > the exact query you make. > > > > > > > > -- > > > > > > > > > > > > Best regards, > > > > George Nicolae > > > > IT Manager > > > > ___________________ > > > > X-Playin - Professional Web Design > > > > www.x-playin.f2s.com > > > > > > > > > > > > > > > > "Thomas "Omega" Henning" <tomi@mediasoft.ro> wrote in > > > > message > > > > news:20020103065519.93149.qmail@pb1.pair.com... > > > > > I forgot to type in something if i substr the date so i get only the > > > year > > > > > from it then is it possible? > > > > > "George Nicolae" <geomasterweb@hotmail.com> wrote in > > > > > message > > > > > > > > > > news:20020102182824.88893.qmail@pb1.pair.com... > > > > > > you can't make this query because type mismatches. > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > > > Best regards, > > > > > > George Nicolae > > > > > > IT Manager > > > > > > ___________________ > > > > > > X-Playin - Professional Web Design > > > > > > www.x-playin.f2s.com > > > > > > > > > > > > > > > > > > > > > > > > "Thomas "Omega" Henning" <tomi@mediasoft.ro> > > > > > > wrote in message > > > > > > > > > > > > news:20020102174918.65567.qmail@pb1.pair.com... > > > > > > > Hello, > > > > > > > > > > > > > > Is it possible to order the table somethin like this > > > > > > > 'select * from intrat order by idatum+iszam DESC; ' > > > > > > > where idatum is date > > > > > > > and iszam is int > > > > > > > > > > > > > > thanks > > > > > > > > > > > > > > Thomas "omega" Henning > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

« previous php.db (#15368) next »