| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> do a forced reload (how depends on browser) <1> plus the query is an update query, rather than for data display. <2> rnx: add more data before you test, if word occurs in >50% of the rows, it will not be selected <3> hello...i have this problem: i have a registration form that p***es the elements into a mysql table...i want for one element to check that it exists as an entry to another table before the user can make a successful registration..How can i do it? <4> urks ... of course ... i should have known that <4> stupid me <4> lokus: thanks <3> anyone? <2> define "p***es" <2> you add, retrieve, delete and update data in the db tables, what is "p***es" <3> ahmmm let me make it simple..I have a table that keeps Employees Information and has these elements: Name,Surname, Employee_ID ,Factor,Director_ID <3> the director must be an entry to the employee table <2> foreign key? <3> so i want to ensure somehow that when i try to make a registration and i put a Director_id that it exists in the employee table as employee_id <3> "local" key <2> either do it in your application or use foregin key referential integrity (innodb only)
<2> !m Psycho-MaN foreign key <5> Psycho-MaN: (PRIMARY KEY and UNIQUE Index Constraints) : http://dev.mysql.com/doc/mysql/en/constraint_primary_key.html <2> !m Psycho-MaN innodb foreign key <3> lokus : i did it in mysql tables... <5> Psycho-MaN: Nothing found <3> the problem is that i want to check it live <3> when i try to p*** values through php <3> is it possible? <2> again, what is p***? insert <3> yeap <2> you can do a select first to check and then decide to insert or return error <2> if you use innodb foreign key constraint then it can be automated <3> yeap i use constraint but i want to have something like an alert <3> to say there is no director with thiss id...Plz put the correct.. <3> something like that <2> Psycho-MaN: the insert should failed if you use innodb foreign key constraint <2> the nit is up to your application (php) again to capture that and decide what to do <3> yeap it fails lokus but php doesnt see it <3> the user thinks that he made a succesful registration <2> Psycho-MaN: what error will it returned? there should be a way to capture it <2> mysql_error() ? <3> i see.. <6> hi guys, i have two tables in my database, i want to compare two fileds. the only difference between the two is that 1 field has the samen value as the other one, except for the fact that it has "000" behind it's value. for example. 1 field has the value 2, in the other table it has the value of 2000. i want to select these records. but select * from a,b where a.c = b.c + '000' is not working. any ideas? thanks in advance <2> Mosselmaniac: what data type? number or string? <6> String <2> Mosselmaniac: select 2 + '000'; shuold return 2 :) <6> i want it to return 2000 :P <6> * 1000? <2> Mosselmaniac: select '2' + '000'; shuold return 2 too :) <2> Mosselmaniac: concat() will concat 2 string <2> Mosselmaniac: select concat('2','000') <6> does my server support that? never seen that <6> but it's set as string... <6> wow <6> dude lol <6> the mysql server stops! <6> it crashes because of that query :S <6> and i ran it again, and it works. hmmf <6> $query = "SELECT * FROM kern***ortiment,looproute WHERE kern***ortiment.debiteurnr = '$userId' $xtra AND looproute.debiteurnr = '$userId' AND looproute.groep = concat(kern***ortiment.groep,'000') ORDER BY looproute.looproutenr"; <6> that's it :P <2> Mosselmaniac: echo $query and show that <7> i'm trying to back the databases on our office intranet app server, just doing a series of mysqldump --opt commands, however 2 of the databases have innodb tables, and they're having trouble with the backups. it seems the certain tables have locks on them, and the locktables commands ***ociated with mysqldump is throwing a wobbler and saying the tables don't exist. <7> mysqldump: Got error: 1146: Table 'ggs_mi_new.all_dates' doesn't exist when using LOCK TABLES <7> does anyone have any idea why this is happening? <7> or any clue how to resolve it? <8> i need to know wether or not a certain row is within the first 20 results of a certain query, is there a way to do this without looping through all the results with php? (mysql 4.0) <9> Ender: perhaps LIMIT 20; and then parse results by hand. <8> parsing them by hand = using php to loop through them, and my question was wether it can be done with mysql alone :) <2> temp table and check the temp table <8> mysql 4.0 has no subqueries :o <10> is there a way to get mysql to bring back a tinyint(1) as true/false? <2> so use temp table and do 2 query <2> tinyint(1) is never a true/false <11> lokus: well it would cast fine though .. <11> which is why BOOLEAN is an alias to tinyint(1) in mysql5 <2> sure, 0 flase and nonzero true <2> *false <12> Edward123: select if(tinyintfield = 0, 'false', 'true') but that ***umes non-zero is true <13> Hello, I can connect to my mysql server only from localhost and only if I use mysql -uuser -p, but it dosent work from other hosts <13> and I dont see that the port 3306 is open <13> any idea on how to connect to my mysql server from other hosts?
<12> heka: check your my.cnf for skip-networking and comment it out, then restart the server <10> shabbs: thanks for that <14> hello <14> need help, i've two mysql querie, on of them give me a result but not exactly what i want and the second one doesn't works, but if it works it will be exactly what i want <14> http://www.rafb.net/paste/results/sDR1KK69.html <13> shabbs: that was the problem, thanks! <3> hello :-) when i write (php) mysql_query('SELECT......') how can i catch the return of select and save it in a variable? <14> Psycho-MaN, $return = mysql_query('SELECT ... '); <14> and then <8> $array = mysql_fetch_array($return); <14> $data = mysql_fetch_array($return); <8> :) <14> :) <3> oh thnx god..i love you guys! <14> no problem ;) <3> Jessy, Ender it is the same if the return of select is not an array?i mean it is only a string e.g <14> yes <3> and it fetches the string only? <14> if you make 'SELECT pseudo FROM table' <8> each thing you select will be in the array, if you select only one thing the array will have only one element <14> you only have $data['pseudo'] <3> niceeee ...thnx a lot....i owe you a coffee :-P <14> heh <14> I give a coffee if somebody can get me an solution for my issue : http://www.rafb.net/paste/results/sDR1KK69.html <14> sed s/get/give/g <14> sorry for my pusy english, I'm a frenchie ^^ <14> i found the solution, if somebody's interesting : http://www.rafb.net/paste/results/fNZpIB39.html <15> someone here handy with mysql table joining and match results ? <16> hi, could the log-bin option make mysql go high on HD Read? <14> ^Willie^, don't ask to ask, ask :) <14> n0n0x, sorry I don't have any infos about this <15> then i first ask if someone will reply <14> ^Willie^, i'll reply :) <15> ok <15> my point is i want to search a few fields in an table for an text string <15> SELECT * FROM Klanten WHERE MATCH (`Bedrijfsnaam` , `Omschrijving` , `Website` , `Woonplaats` , `KvkNr`) AGAINST ('$Input') LIMIT 0 , 10 <15> works when i type an fullword <14> ok <15> there is a word 'stone' in a line <15> i type stone and it find that line <15> i type ston% and it find nothing <14> hmm <14> the '%' only works with LIKE <15> i know match is an full text search <15> is there an way to do this <14> I have no idea at the moment :s <15> i can't use WHERE (`Bedrijfsnaam` , `Omschijving` ) LIKE '%piet%' <14> MATCH is a Full-Text Search Functions <15> i know <14> why ? <15> i don;t want to invent the wheel <15> match option of mysql make it posible to sort on best match first <14> hmm ok <15> when i have 20 times OR LIKE 'string' i can't <15> or need to write 30 lines of php for it <14> are you using this in php ? <15> yes want to make an search engine <14> yes, that's why i guess <14> what i guess <14> it must have another function <14> which accept % and _ <15> IN BOOLEAN MODE ? <14> http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html <14> yes <14> # <14> 'apple*' <14> Find rows that contain words such as apple apples applesauce or applet. <14> that's what you exactly want <15> ahh <15> i can use word* <14> yes ;) <15> cool works almosth like i need :p <15> other point is i search 2 words
Return to
#mysql or Go to some related
logs:
#linux ftp_connect Fatal error: Maximum execution time of 30 seconds exceeded #sdl smb signing is incompatible reload profile.env kubuntu assign keyboard shortcut #fedora commctrl #css javascript TextNode ampersand xp execute on reboot
|
|