CodingSQL again :C

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  steve  
 To:  ALL
30966.1 
SELECT * FROM stock, colours WHERE stock.pid = 10 AND stock.stockid != 4 AND stock.colourid = colours.colourid GROUP BY stock.colourid ORDER BY colours.title

Why does it still return records with a stockid of 4? :'S If I change != to = then it will ONLY return that row. And I am confused and != is in the menu, the pointy-arrows do not work either

:'C

0/0
 Reply   Quote More 

 From:  steve  
 To:  steve     
30966.2 In reply to 30966.1 
Menu = MysQL.com manual @@

0/0
 Reply   Quote More 

 From:  Rowan  
 To:  steve     
30966.3 In reply to 30966.1 
I do not know the answer to your problem, but I would not be entirely surprised if it was something to do with GROUP BY behaving in a way you didn't quite expect. Perhaps it's just me, but I swear it does different things every time I use it.
0/0
 Reply   Quote More 

 From:  steve  
 To:  Rowan     
30966.4 In reply to 30966.3 
Haha, suprisingly taking out the group by doesn't fix it :(

0/0
 Reply   Quote More 

 From:  Rowan  
 To:  steve     
30966.5 In reply to 30966.4 
Does it work if you strip it right down to summat like
sql code:
SELECT * FROM stock WHERE stock.stockid <> 4
?
0/0
 Reply   Quote More 

 From:  steve  
 To:  Rowan     
30966.6 In reply to 30966.5 
IT DOES WORK :C IT DOES WORK YES (fail)

0/0
 Reply   Quote More 

 From:  steve  
 To:  Rowan     
30966.7 In reply to 30966.5 
Oh no :'S

It was working (fail) I had fucked up and submitted my form too many times, and the database was fucked :$ :D

0/0
 Reply   Quote More 

Reply to All    
 

1–7

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats