RE: Help needed on query on multiple tables

2010-06-03 Thread Steven Staples
lto:st...@astroh.org] > Sent: June 3, 2010 11:55 AM > To: Steven Staples > Cc: 'MySql' > Subject: Re: Help needed on query on multiple tables > > Thanks! That did it perfectly! > > Michael > > > On Jun 3, 2010, at 11:45 AM, Steven Staples wrote: > > &

Re: Help needed on query on multiple tables

2010-06-03 Thread Michael Stroh
Thanks! That did it perfectly! Michael On Jun 3, 2010, at 11:45 AM, Steven Staples wrote: > How about this? > > SELECT >`first_table`.`names` >, `first_table`.`version` >, (SELECT > COUNT(`other_table`.`names`) > FROM `other_table` >

RE: Help needed on query on multiple tables

2010-06-03 Thread Steven Staples
How about this? SELECT `first_table`.`names` , `first_table`.`version` , (SELECT COUNT(`other_table`.`names`) FROM `other_table` WHERE `other_table`.`this_id` = `first_table`.`id`) AS 'count' FROM `first_table` WHERE `first_table`.`p

Re: Help needed on query

2002-04-23 Thread Chris Johnson
You should be able to just use something like this: Select uid, username From tablename Where '$externalstringvar' like query; That's PHP syntax. You'll have to use whatever makes sense for your scripting or programming language in place of the $externalstringvar variable. The single-quotes ar

Re: Help needed on query

2002-04-23 Thread Aleksandar Bradaric
Hi, > Now I need a query which will take the values from column > 'query', treat them as patterns for matching and return > row(s) which match the given string 'blahblah'. In this > example, the matched data is obviously in second row. > (bla% matches blahblah) > Do I make any sense?