daGrevis Posted February 12, 2012 Report Share Posted February 12, 2012 Saīsināt nevajag. Daudz pareizāk ir pateikt kuras kolonas tieši tev ir nepieciešamas, jo, ja tu izmanto asterisku (*), tu pieprasi visus datus. Lasi: datus, kas tev arī nav vajadzīgi... Tātad: `tabula1`.`kolona1` `tabula1`.`kolona2` `tabula2`.`kolona3` Un par WHERE un JOIN'u... tā gan nav problēma... SELECT `tabula1`.`kolona1`, `tabula1`.`kolona2`, `tabula2`.`kolona3` FROM `tabula1` JOIN `tabula2` ON `tabula2`.`kolona3` = `tabula1`.`kolona2` WHERE `tabula1`.`kolona1` = 'Hello, world!' Quote Link to comment Share on other sites More sharing options...
vincister Posted February 12, 2012 Report Share Posted February 12, 2012 Boolean, jo Tavs pieprasījums atgriež tukšu kopu - false. Vispirms jau derētu pārbaudīt vai rezultāts vispār ir iegūts, pirms to apstrādāt. Quote Link to comment Share on other sites More sharing options...
scvaer Posted February 12, 2012 Author Report Share Posted February 12, 2012 Laikam biju aizmirsis pie WHERE pierakstt tabulu. ;) Paldies krtjo reizi. ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.