#mysql
29 October 2007
Total 28 pages. You are browsing page 4/28.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
01:14 <****> SiliconG: (EXPLAIN Syntax (Get Information About a SELECT)) : http://dev.mysql.com/doc/mysql/en/explain.html
01:15 <****> the result they all bring up is 0.. no error
01:15 <****> brandonc503: where is the variable $number coming from?
01:16 <****> Hermann: your syntax is totally wrong.
01:16 <****> i also can't help but notice that you've spelled "category" wrong heh
01:16 <****> Hermann: don't know how else to put it
01:16 <****> SiliconG: http://www.hackmysql.com/optimize
01:16 <****> litheum: http://72.185.210.71/thebigone/product.php?number=3539
01:16 <****> brandonc503: where does it come from *in the code*
01:17 <****> brandonc503: you assign to $catagory, but there is no variable $number used anywhere
01:17 <****> lithium $get
01:17 <****> $catagory = $_GET['number'];
01:17 <****> $catagory = mysql_real_escape_string($number);
01:17 <****> wtf is $get ? :-P
01:17 <****> chadmaynard: I have managed to use a WHERE CASE [...] END before... but for some reason this kind of query doesn't work
01:17 <****> can someone help me find out if I have temp tables enabled on my copy of MySQL? I'm having issues with DotProject
01:18 <****> it worked in my catagory section
01:19 <****> Hermann: CASE someCol WHEN 1 THEN 'foo' ELSE 'bar' END <- notice i only use someCol once.
01:19 <****> litherum: $_GET is the php variable for querystrings
01:19 <****> err $_GET
01:19 <****> ki77a77: he didn't write "$_GET", though, did he
01:19 <****> thats what i used
01:19 <****> no but in code is there
01:19 <****> brandonc503: look at your code, you don't assign to the variable "$number" *anywhere*
01:19 <****> litherum: ah
01:20 <****> holy crap what are you people doing, do your IRC clients not support tab completion?
01:20 <****> litherum: I think I'll go back to watching 'Constantine'.
01:20 <****> neither of you has typed my nick correctly yet :-P
01:20 <****> litheum!
01:20 * chadmaynard wins
01:20 <****> what the hell is litherum....
01:20 <****> chadmaynard: in my case someCol is an input variable to the stored procedure, and 'foo' is like 'col' = 'value'
01:20 <****> chadmaynard: this place is nuts :-P
01:20 <****> lithium!
01:20 <****> still wrong!
01:20 <****> at least that's a word, though!
01:20 <****> litheum: i know. lately it has been
01:20 <****> laudanum!
01:21 <****> litheum: the $number is $_GET from the http://72.185.210.71/thebigone/product.php?number=4827
01:21 <****> Hermann: CASE just isn't for you...., use IF
01:21 <****> brandonc503: paste me the line of code that assigns to the variable called $number
01:21 <****> yay my ip
01:21 <****> damn it
01:22 <****> can someone look @ this and tell me if it's related to temp tables or just not having access? http://www.pastebin.org/6296
01:22 <****> JeevesMoss: we need the SQL error.
01:23 <****> JeevesMoss: those are PHP errors
01:23 <****> JeevesMoss: mysql_error()
01:23 <****> chadmaynard: ok, so if I'm reading it right, it can't connect to the MySQL database? corect?
01:23 <****> litheum http://paste.ubuntu-nl.org/42522/
01:24 <****> JeevesMoss: oh i missed that. I was too lazy to read the backtrace. "Access denied for user 'DotProject'@'%' to database 'DotProject'" means that that user doesn't have that privilege on that database. yes
01:24 <****> brandonc503: that doesn't even contain the variable "$number" in it!
01:25 <****> brandonc503: this is a php problem at any rate, maybe they can help you figure this out. i can't really do much more than tell you that you are never actually assining a value to any variable named $number.
01:25 <****> brandonc503: you're trying to *use* it as though it had a value, but i've yet to see anywhere you've actually assigned any value to that variable!
01:25 <****> chadmaynard: ok, thanks. that's what I was checing
01:26 <****> it is posted from first page thru link to the get in the second
01:26 <****> JeevesMoss: if you SHOW GRANTS FOR 'DotProject'@'%' I could assist you further
01:26 <****> chadmaynard: on sec. I'm MySQLYoging it
01:27 <****> woo hoo
01:27 <****> i've got a query that i-sn't doing what I want it to
01:27 <****> http://pastebin.com/m49ffcb0f
01:27 <****> chadmaynard: have I mentioned today how much I hate DotProject?
01:28 <****> the first query shows the data that I believe should show up in the second
01:28 <****> JeevesMoss: i don't even know what it is
01:28 <****> chadmaynard: www.dotproject.net
01:28 <****> prakriti: you are inner-joining on NULL values.
01:29 <****> but NULL = NULL right?
01:29 <****> prakriti: nope
01:29 <****> wtf :(
01:29 <****> why not?
01:29 <****> NULL IS NULL
01:29 <****> (NOT NULL) IS NULL <- thanks litheum
01:29 <****> both true
01:29 <****> SELECT NULL = NULL;
01:29 <****> NULL is a term that means a value has not yet been assigned. You cannot use = or != to compare a value to NULL. An empty string ("" or '') is not equivalent to NULL. You test for NULL using IS NULL or IS NOT NULL.
01:29 <****> chadmaynard: here's the dump
01:30 <****> chadmaynard: http://www.pastebin.org/6300
01:30 <****> NULL and '' are equal in oracle
01:30 <****> What's the difference between God and Larry Ellison?
01:30 <****> JeevesMoss: herm
01:30 <****> so, my query is gonna be hosed?
01:31 <****> How can I make a row be unique.. that is there can't exist a row where all the fields are teh same?
01:31 <****> God doesn't think He is Larry Ellison.
01:31 <****> chadmaynard: I'm wondering if I should be granting all on that one to see if it clears up the problems
01:31 <****> JeevesMoss: you need to grant CREATE TEMPORARY TABLES
01:31 <****> to that user on that DB
01:31 <****> because street_suffix doesn't = street_suffix if they are both NULL?
01:31 <****> chadmaynard: syntax?
01:31 <****> prakriti: yes
01:31 <****> but they are equal.. they are the same thing
01:32 <****> its not fair!
01:32 * prakriti throws a tantrum
01:32 <****> lol
01:32 <****> JeevesMoss: sigh GRANT CREATE TEMPORARY TABLES ON DotProject.* TO 'DotProject'@'%'; <-
01:32 <****> so
01:32 <****> i should update my table to have '' where column is null
01:32 <****> then set a default on the column?
01:32 <****> prakriti: no
01:33 <****> chadmaynard: thanks. this is why I use SQLYog
01:33 <****> prakriti: your approach to the query was just not a good one
01:33 <****> prakriti: use coalesce
Total 28 pages. You are browsing page 4/28.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
