You are here: Re: newbie SQL questions... « PHP SQL « IT news, forums, messages
Re: newbie SQL questions...

Posted by Captain Paralytic on 01/26/07 10:04

On 26 Jan, 09:00, "Niel Darren" <n...@pszzxasm.co.uk> wrote:
> Hi,
>
> I am a total newbie with SQL-statements, but hope you can help me, i have a
> few questions:
>
> 1. How can i get the number of rows/records in a table with a SQL statement
> ?
either SELECT COUNT(*) FROM table
or if you are using the MyISAM engine SHOW TABLE STATUS LIKE 'table'
>
> 2. I have a record looking like this:
> ID, TIMESTAMP (hh:mm:ss), datastring
TiIMESTAMPs are usually 'YYYY-MM-DD HH:MM:SS', if you are only storing
hh:mm:ss then it is a TIME. When you do your query between 2 times, it
will then return values between those times for all days. Is that what
you want?

>
> Is it possible with a SQL-statement to for example extract all records
> between one timestamp to another in that format or should i convert it into
> a unixtimestamp instead for simplicity ?
>
> 3. Is it possible to do calculations ? i have another table with: ID,
> TIMESTAMP, graph x-point value
> Then i want to instruct it to extract from one time to another, and give
> me the average of all theese values (only asking if i can do it with SQL, if
> not i can do it with code ofcourse).
>
> Do you have a link to a PDF or similar resource that is useful for a SQL
> newbie so i could get an insight in SQL - as i said, i am not much into it.
>
> Thanks alot.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация