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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > 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" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > 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" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > 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" <[EMAIL PROTECTED]> wrote in message
> > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > 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" <[EMAIL PROTECTED]> wrote in message
> > > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > > 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" <[EMAIL PROTECTED]> wrote in message
> > > > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > > > 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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to