[PHP-DB] Re: What's wrong with this QUERY?? - Thanks all.

2004-07-22 Thread Harry G
Thank you everybody. "Harry G" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a database with members details and PK is id. > > $thing = "[EMAIL PROTECTED]"; > > $query = "SELECT id, email, familyname FROM members WHERE email=$thing"; > $result = mysql_query($query);

Re: [PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread Jason Wong
On Friday 23 July 2004 10:57, Harry G wrote: > I have a database with members details and PK is id. > > $thing = "[EMAIL PROTECTED]"; > > $query = "SELECT id, email, familyname FROM members WHERE email=$thing"; $query = "SELECT id, email, familyname FROM members WHERE email='$thing'"; Please r

Re: [PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread zareef ahmed
--- Harry G <[EMAIL PROTECTED]> wrote: > Hi, > > I have a database with members details and PK is id. > > $thing = "[EMAIL PROTECTED]"; > > $query = "SELECT id, email, familyname FROM members > WHERE email=$thing"; Make it $query = "SELECT id, email, familyname FROM members WHERE email='$thin

Re: [PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread Larry E . Ullman
$thing = "[EMAIL PROTECTED]"; $query = "SELECT id, email, familyname FROM members WHERE email=$thing"; You need to quote non-numeric values in SQL. It should be $query = "SELECT id, email, familyname FROM members WHERE email=''$thing'"; Also, you don't really need to select the email value since

[PHP-DB] What's wrong with this QUERY??

2004-07-22 Thread Harry G
Hi, I have a database with members details and PK is id. $thing = "[EMAIL PROTECTED]"; $query = "SELECT id, email, familyname FROM members WHERE email=$thing"; $result = mysql_query($query); If i do a query where id=$thing. and $thing="20"; this works fine and I get the desired result. But what

Re: [PHP-DB] FULLTEXT and LIKE

2004-07-22 Thread Jeffrey Moss
Well, like will do a full table scan if it starts with a wildcard, so you dont want to do it that way. I'd do full text search. http://dev.mysql.com/doc/mysql/en/MySQL_indexes.html -Jeff - Original Message - From: "Monty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July

[PHP-DB] FULLTEXT and LIKE

2004-07-22 Thread Monty
Hi, My head is swimming with lots of info gleaned from various newsgroups about using fulltext indexes in MySQL, but, I'm still not sure what the best solution would be for what I want to do. I'm concerned about the 3-char minimum and not being able to search on partial words (my version of MySQL

[PHP-DB] Re: Query returns duplicate rows

2004-07-22 Thread David Robley
On Thu, 22 Jul 2004 05:59, Brock Jimmy D Contr 74 Mdss/Sgsi wrote: > My query is returning duplicates rows. > > table: elements > elementId > standardId > elementtext > category > mcode > linenum > > table: scores > scoreId > taskId > scores > > Here's my query: > SELECT distinct elementtext,ca