@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25



Comments:

<0> hi all
<1> how do I return the row number of a table?
<2> you can't
<2> sql doesn't really have row numbers
<2> you can return a column value tho
<0> count ?
<0> select count(field) from my table, is this right for you
<2> ya maybe he meant count
<3> does someone know if an sql script can be split up into several parts that can be included into a master script to be able to execute all at once?
<1> kioto I just tried and that could work for me pretty nice, thanks ;)
<0> mp
<0> np
<1> Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause <--- what do I do about this?
<0> kleini what you need exactly
<4> add a group by clause
<0> hei dudes i need an advice, i working with a web form to use insert data into the table users



<1> andrewbryson I'm a n00b, so pretend like I'm 3,5 and talk like that please ;)
<0> i have added two unique keys on the nick field and another on email field
<4> awww you poor baby! would Kartagis like a cookie ?
<4> bad!
<1> andrewbryson yes I would ;)
<5> Kartagis: paste your select statement (if it's one line, use a pastebin otherwise)
<6> Kartagis: actually you can have min/max/count without group bys in mysql
<0> when i need to insert another user into this table, to get back data to the user about duplicate key
<6> but as SELECT MAX(col) FROM t1;
<1> jink SELECT ad,eposta,yorum,DATE_FORMAT(tarih,"%d-%m-%Y %T"), count(tarih) AS yenitarih FROM defter;
<0> i need to execute two query, the first check that doens't exist the same email and the same nick
<5> my turkish kinda ****s (ie: i speak none)
<0> and later i can execute a completed insert into the database if it's ok
<4> so does mine jink :(
<5> andrewbryson: :P
<5> Kartagis: so, tell me, what is it that you're selecting
<4> one would ***ume that there are some non-aggregate columns in the select
<4> otherwise i doubt that mysql would complain
<1> ad = name,eposta=email,tarih=date,yenitarih=newdate
<5> andrewbryson: SELECT ad,eposta,yorum,DATE_FORMAT(tarih,"%d-%m-%Y %T"), count(tarih) AS yenitarih FROM defter;
<5> andrewbryson: that's the statement, translation above this line
<5> Kartagis: yorum? defter?
<1> jink yorum = comment, defter = notebook
<4> well the way i see it they are just table and column names - does not really matter what they mean :P
<1> sorry I forgot that
<5> Kartagis: np :)
<5> andrewbryson: true, but it's nice to know what to group by ;)
<4> lol
<4> well as a general rule, group by everything in your select that is not an aggregate :P
<5> Kartagis: i don't understand why you want to count(date) as newdate ? it returns a number, not a new date..
<1> jink if you could understand that's Turkish, your Turkish doesn't **** ;)
<5> Kartagis: :)
<5> Kartagis: i might even be able to pronounce it, but that wouldn't mean i know what it means :)
<7> hi!
<4> hi!
<7> can anyone how is the sintax of the Interval function?
<8> hi guys
<5> !m alecs interval
<9> alecs: (Comparison Functions and Operators) : http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html
<8> how can i use TIMESTAMP to SELECT data ?
<8> SELECT * WHERE ??
<5> !m heliostech timestamp
<9> heliostech: (Overview of Date and Time Types) : http://dev.mysql.com/doc/mysql/en/Date_and_time_type_overview.html
<1> jink what I'm trying to do is count the tarih field and if it's 0, print something else on the page other than with it's not 0
<8> nothing is said in thoses docs
<10> good morning!
<1> s/with/when/g
<8> oh yes
<8> sorry i wasn't on the good page then
<8> thanks
<4> good morning Jax!
<10> :)
<5> Kartagis: problem is, if it isn't present, how would you know?
<1> jink wouldn't it return 0 if none exists?
<5> it would return 0 if there are no entries at all
<4> no it would return nothing at all Kartagis
<7> if i want to select a date from last mont
<7> how can i do it ?
<5> but for that, you could just perform the select, and then check for num_rows
<7> i know the now ()
<7> ifunction, but it wouldn't help me much



<5> alecs: i don't know what you need
<5> Kartagis: you got that?
<7> jink something like that
<7> select * from send_news where send_date= CURRENT_DATE() and login_date= CURRENT_DATE()-30
<4> dateadd
<4> or whatever the myself version of dateadd is :P
<4> ah
<4> date_add(now(), interval 30 day);
<4> although you might want to use -30 :P
<4> you can probably do -1 month as well
<4> although i am just guessing
<7> yes,,,
<11> i had a pwoer supply problem and my machine reset a few times
<11> how all ym tables are empty
<11> for every database
<4> ah there is apparently a date_sub too
<4> seems a bit redundant to me :P
<7> i think that i'm doing wrong .... select * from send_news where login_date = DATE_ADD(now(), interval 30 day)
<4> well that would only work if the date was exactly the same
<4> are you sure you don't want a range of dates ?
<8> i don't understand time types
<7> wery sure...
<8> how can i select 10 sec of data 20 sec before
<4> is login_date a date or a datetime ?
<7> i need to extract records from last monts (30 days)
<8> i wanna select a range X with an offset Y
<7> login_date and send_date are date
<4> well now() is a datetime
<1> if (mysql_num_rows($result)= "0"){ <--- isn't this correct?
<4> you probably want curdate()
<4> Kartagis: use ' instead of "
<4> oh wait
<8> if (!mysql_num_rows($result))
<4> that is not an sql statement
<7> :))
<8> correct go to #php
<7> * ##php
<7> more precise
<8> some body can help me with time selection
<12> Hi, following problem: I'd like to have all customer_ids from a customers table without some specific customer_ids. ATM I'd do a select on another table to get the ids that I don't like and then filter it in my programming language - I think that's quite ugly so is there a better solution using sql?
<4> qwertz: where not in (list of ids you don't want)
<4> or if you have sql to select the ids you don't want
<4> where customer_id not in (select customer_id from blah that you don't want)
<4> you can probably do it more elegantly with a join though
<7> hellotech... what ?
<13> hi there
<13> I have upraded my sql server (because of a security prob)
<12> andrewbryson, thanks for the suggestions! I darkly remember that I tried IN() with an enclosed SELECT query but it didn't work, testing now it runs quite smooth - so thanks again
<13> now I get 060524 11:06:27 [Warning] './mysql/host' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
<13> 060524 11:06:27 [Warning] './mysql/user' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
<13> etc
<13> the problem could also be that the server wasnt properly rebootet because of e power outage
<13> any tips?
<7> yes...
<7> change the charset....
<14> hi guys, im using mysqlfront to export a sql file but when i try to import the sql file into phpmyadmin i get a error #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 19
<13> how can I do that?
<13> alecs: in mysql?
<7> :-??
<7> whait .,...
<13> brb
<7> ok
<7> andrewbryson: are you there?
<4> more or less
<7> can you help me?
<4> i have no idea :P
<7> :((
<4> you might have to be more specific with a question :P
<7> yes...
<7> ok
<3> kioto, does mysql have a sql script command that includes additional sql scripts?
<7> i'm am triing to make a newsletter, and i must be able to select only some id's corresponding some criteria
<14> anyone?
<7> like... something like that :: you have a personal message, or you haven't logged from almost a month


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

gstreamer-mad ubuntu
iptables -t nat -A POSTROUTING -o ra0 -j MASQUERADE
#php
ssh-copy-id centos4
#perl
fluxbox 1.0 font big
ryugi death note
backup is for sissies
#css
safeconfigparser



Home  |  disclaimer  |  contact  |  submit quotes