@# 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



Comments:

<0> yeah i thought that too
<0> and put a WHERE id<30 for example
<1> Silent******in: You may need to: SELECT * FROM (SELECT .. ORDER BY ts DESC LIMIT 40) ORDER BY RAND();
<1> Silent******in: If you have numeric id and can make sure it has all values 1..80 you can simply generate random number(s) from 1 to 40 and your task becomes very simple
<0> i thought that too , i'm doin it in php ...
<1> Silent******in: In brief the better you define the problem the better solution you will find :)
<0> but i don't want to write too much :P
<0> i am doing a tester .. to test myself german past tenses
<0> cause i have test tommorow :(
<2> does anyone have any info on connecting to mysql via a .net application with c#?
<0> square never done that myself so i done something a bit diferent
<2> what did you do different?
<0> just outputed the mysql table with a php script , and import it from c# language
<2> um
<0> imported the output
<2> i want to insert data from my c# application



<0> oh
<0> depends what data
<2> nothing fancy
<0> you can also do a php script to add data that were received using GET method
<0> in that case you could use #c to do something like open adress "http://blabal/script.php&data=blabla
<2> yeh
<0> now i go to study
<2> cya
<0> cya
<3> how can i make a join between Dog(dogid, name, ownerid) Owner(ownerid,name) where ownerid of Dog references ownerid of Owner
<4> !m bladhasd JOIN
<5> bladhasd: (JOIN Syntax) : http://dev.mysql.com/doc/mysql/en/JOIN.html
<4> SELECT d.dogid DogID ,d.name DogName ,d.ownerid OwnerID ,o.name OwnerName FROM Dog INNER JOIN Owner USING (ownerid) WHERE (whatever)
<6> ok dba's/developers
<6> I'm lost
<6> I have a user that cannot connect to a database
<6> I cannot understand why
<7> the error is a good start
<6> access denied
<6> standard user can't connect
<7> full error
<4> the *complete* error is a good start
<6> ok
<6> ERROR 1045 (28000): Access denied for user 'demo1'@'localhost' (using p***word: YES)
<4> wrong p***word
<7> or no user for that ;)
<4> wrong user/p***word then
<6> I would normally agree with you
<6> however I've just changed it
<6> and flushed the privs
<6> to make sure
<4> how did you change it?
<6> on the last occasion I've used the mysql-administrator tool
<6> however before I just uset the set p***word
<6> option
<7> what did you change?
<8> what's the canonical way to handle a link from table A where for each A it can link to *either* table B *or* table C?
<8> or nothing, of course.
<6> Leithal in what way
<7> muhoo: two foreign keys
<8> Leithal: that's what i have. but it doesn't capture the either/or nature of it.
<8> i've been hacking around it with application code
<6> I just did
<8> i.e. table A has foreign keys for B *and* C
<6> set p***word for 'demo1'@'%' = P***WORD('$P***');
<9> add a new explicit entry for 'demo1'@localhost
<6> well, I can do that. But surly if % is not even connecting, thats a pretty serious config problem
<9> I believe % does not cover localhost. if you try using the actual IP of the system with --host, it may work right now.
<6> just adding localhost now
<9> I have always seen and made entries for localhost and "%.domain.com"
<6> testing....
<10> Isn't LIKE supposed to be case insensitive?
<6> well I'll be buggered with a fish fork
<6> infi thank you very much
<7> muhoo: which way are the relationships then?
<6> adding a localhost account was spot on
<9> ikonia ;)
<7> sorry was afk
<7> Setien: no
<7> us BINARY LIKE
<6> all the databases I've created and I've never known that



<6> big thanks
<9> cheers
<10> Leithal, but binary like IS case sensitive, right?
<7> right, any "BINARY" comparison is
<7> WHERE BINARY foo LIKE ..
<10> Leithal, but I wrote "case INsensitive"
<7> oh
<7> well it is by default then
<10> Leithal, so rephrased: LIKE is supposed to be NOT case sensitive, right?
<7> unless you are using some binary collation
<7> right
<10> Leithal, do you know if a binary collation can be implied if you are doing something like this:
<10> WHERE IF(data_type='String',value_string,value_number) LIKE '%foo%'
<10> ?
<7> that should be case insensitive
<7> _unless you are using a binary collation_
<10> Leithal, now my if statement is somewhat more complicated and includes CASE and IF nested with both INT and VARCHAR columns, and the results coming out are case sensistive
<10> Leithal, I am not using a binary collation unless it's something I am doing inadverdently
<10> like it's doing it when I use CASE WHEN
<10> or something
<7> if you have an example that would be good
<7> it may be that you are trying to cast between data types, and that may be effecting it I guess
<7> but an example would help
<10> Leithal, hold on
<10> http://pastebin.com/551189
<10> focus on the last bit of the WHERE
<7> more info
<7> what values do you have, what are search strings returning?
<7> what strings are you using that cause "wrong results"?
<7> if you compare a string to a number, then the string will be cast to an int
<7> and that will, if a pure string, be 0 generally
<10> I have a string called "Seating/Chairs" which isn't matching against the search "cha"
<10> but it matches "Cha"
<10> I'll try a cast
<10> hold on
<11> sup channel
<10> Leithal, this'll take a bit - I am hving problems getting it to accept the cast syntax
<12> I am completely new to mysql. I would like to use it to create a calendar application on my website. Is there a easy to understand tutorial for mysql where I can learn the basics of operating it? I am particularly interested in tuts geared towards Linux users
<9> !tell evolocus about tutorial
<5> Alrighty.
<12> infi, whats the diff between sql and mysql
<11> anything look wrong with query? $updatesqli = mysql_query("UPDATE `records` SET `type` = 'I' WHERE `record_id` = '$record_id") or die('Query failed: ' . mysql_error());
<9> SQL is an acronym meaning Structured Query Language, a (generally) standard language for communicating with an RDBMS. MySQL is an RDBMS (relational database management system)
<11> II keep getting this: 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 ''' at line 1
<13> well well what do we have here
<9> mike_: '$record_id"
<11> yeah i noticed still does it : syntax to use near '' at line 1
<10> gah
<13> gahhh
<11> haha
<12> are mysql users same as system users?
<10> Can't I do something like this CAST(IF(a>b,mynumber,mystring) AS VARCHAR) to make sure that evne if a is bigger and the INT column is used, I will still get the column casted to a varchar
<11> as in linux system users?
<9> evolocus, no
<12> mike_, yes
<12> oh
<9> there is a separate access system for connecting to the database
<11> infi said the answer lol
<12> is the user creating part included in the tutorial?
<9> probably, I've never read it ;)
<9> why don't you look and see?
<12> ok
<12> I am right now
<11> evolocus, I just use phpmyadmin
<10> Leithal: It works - I just needed to cast it to a CHAR
<12> what is phpmyadmin
<7> ;)
<11> http://www.phpmyadmin.net
<11> infi, so any other ideas?
<9> eh?
<11> I changed it to this and still getting the same error: $updatesqli = mysql_query("UPDATE records SET type = 'I' WHERE record_id = $record_id") or die('Query failed: ' . mysql_error());
<9> ...
<9> are you sure $record_id isn't empty?
<1> mike_: Dump the query text as you send it and only then you will be able to see what's going on


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

waveforce gentoo
#linuxhelp
named.conf keeps reverting
gmailfs Unable to find account configuration
xorg.conf gamepad
#php
cannot open/read repomd.xml file for repository fedora 5
#php
livna_release
#bash



Home  |  disclaimer  |  contact  |  submit quotes