#mysql
07 November 2007
Total 24 pages. You are browsing page 3/24.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
02:07 <****> ask
02:07 <****> basically there's a user with the host: % and user : localhost
02:08 <****> I've deleted the user host:localhost and user: localhost by typing drop user localhost@localhost
02:08 <****> but when I type drop user %@localhost
02:08 <****> no go.
02:09 <****> so your username is localhost?
02:09 <****> and %
02:09 <****> amazing
02:09 <****> yep username : localhost and host: %
02:10 <****> =o yea i'm very new.
02:11 <****> i am trying to connect to mysql database using php. First i fill out the form and after i click submit i get a blank page. i have the mysql_error(). I dont understand what could be wrong.
02:11 <****> i have the mysql_error() enabled
02:12 <****> you don't enable mysql_error, you echo it
02:12 <****> it returns a string
02:12 <****> ya i am echoing it
02:13 <****> anyone know how I would go about deleting that user using the command line?
02:13 <****> gagan: look in /var/log/httpd/error_log
02:13 <****> slb_: hi
02:14 <****> slb_: check the comment
02:15 <****> Is there a way to issue a DELETE command and have mysql return the rows that it deleted?
02:17 <****> a semicolon
02:17 <****> ornicar: lock, select, delete, unlock or use a trigger to store the deleted rows into a temp table
02:17 <****> If I do a mysql command and get blah blah blah, 1 warning... how do I ask mysql what that warning was?
02:17 <****> show warnings
02:17 <****> show warnings;
02:17 <****> aah :) thank you :)
02:17 <****> hi kim
02:17 <****> hold on
02:17 <****> brain farts
02:17 <****> i will check
02:18 <****> ornicar: or a trigger.
02:18 <****> ornicar, it'll be two queries, regardless. You'll have to SELECT the data before you can DELETE it
02:18 <****> Hello
02:18 <****> I have a question regarding mySQL and checking values in two tables. How would I go about checking if an entry in one table isn't duplicated on another?
02:18 <****> wow kim ill try this!
02:18 <****> :)
02:18 <****> slb_: i don;t know if there is any error
02:18 <****> ki77a77: i get this in the error_log "PHP: Error parsing /etc/php.ini on line 76" repeating like 7 times
02:19 <****> im going to try
02:19 <****> thakns a lot
02:19 <****> let me check what that could be
02:20 <****> so basically if tested has no value it displays NA?
02:20 <****> slb_: yes
02:20 <****> say i wanted to display name as well as any other fields i may add to t2 can i just do t2.* instead or smoething
02:21 <****> kaotrix, SELECT COUNT(*) FROM table1, table2 WHERE table1.column = 'value' OR table2.column = 'value'
02:21 <****> kaotrix: select * from t1 where col_a in (select col_a from t2);
02:21 <****> sans the group_concat or add an and?
02:21 <****> slb_: maybe another group concat
02:21 <****> i mean ,
02:21 <****> group_concat(ifnull(t2.startTime,'NA'), group_concat(ifnull(t2.name,'na')
02:22 <****> would be acceptable right
02:22 <****> i guess it depends kaotrix on what your initial conditions are
02:22 <****> slb_: yes, remember the order by
02:22 <****> ooh ok
02:22 <****> :)
02:22 <****> thanks
02:22 <****> slb_: but i do not know what will the result be
02:22 <****> cythrawll/ki77a77: Thanks
02:22 <****> if you use , in same group_concat
02:22 <****> slb_: can also use another group_concate
02:22 <****> i meant to do it outside of the group_concat
02:22 <****> in addition to
02:23 <****> cythrawll: I think this guy designed the tables wrong though. He has the same field in both tables so I'm assuming they have to be linked somehow.
02:23 <****> can someone tell me the command line to edit a users privilage after I have already added the user? He is located in the User table
02:23 <****> group_concat(ifnull(t2.tested,'NA') order by montofri.dy), group_concat(ifnull(t2.name,'NA') order by montofri.dy)
02:23 <****> Perhaps the same field in the second table should be a forieign key.
02:23 <****> kaotrix, that's how it's usually done
02:23 <****> ah ok
02:23 <****> with a sucky naming convention that is
02:23 <****> He has the same field as primary keys for both tables.
02:24 <****> kaotrix, that's weird
02:24 <****> indeed
02:27 <****> can someone tell me why
02:27 <****> when I type
02:27 <****> INSERT INTO user (host, user, password, select_priv, insert_priv, update_priv, delete_priv) VALUES ("localhost", "php", password("f00") );
02:27 <****> i'm getting a syntax error?
02:28 <****> Xye: that's a bad idea
02:28 <****> I should be using Create user?
02:28 <****> !man create user
02:28 <****> (CREATE USER Syntax) : http://dev.mysql.com/doc/mysql/en/create-user.html
02:28 <****> also, don't use double quotes.
02:28 <****> kk
02:28 <****> you want to use single quotes to delimit strings.
02:29 <****> '', etc
02:29 <****> yea
02:29 <****> I knew that, I don't know why I was using double quotes, just not used to it yet. =o
02:29 <****> in the /etc/php.ini on line 76 i have the directive "display_errors = on " "ini_set(display_errors, 1) to see any parsing errors. Did i set that right. Because with this i can see all parsing errors. Do i also have to enable mysql_error() in the /etc/php.ini
02:30 <****> gagan, no
02:30 <****> gagan: try asking in ##php
02:30 <****> mysql errors don't manifest like php errors
02:30 <****> you have to check the output of mysql_error or mysql_errno
02:30 <****> CREATE USER php [IDENTIFIED BY [PASSWORD] 'f00']
02:31 <****> should work then yea
02:31 <****> i did echo mysqlerror() but still a blank page
02:32 <****> gagan, because that's not the right function
02:33 <****> mysql_error() that should be it no
02:33 <****> gagan, php.net knows, ask it
02:35 <****> when using GRANT syntax, say I wanted to grant a user account with Select_priv, Update_priv and Delete_priv
02:35 <****> would the be correct at all?
02:35 <****> GRANT Select_priv ?
Total 24 pages. You are browsing page 3/24.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
