[PHP] Re: sql query

2005-03-02 Thread M. Sokolewicz
! is a logical NOT operator. It simply turns true => false, and false => true. So, what you have is: $a = true; if($a) { echo 'true'; } else { echo 'false'; } if(!$a) { echo 'false!'; } else { echo 'true!'; } In these 2 cases, it will echo true and true! More info

[PHP] Re: SQL Query Statement for MySQL... (DataType --> TEXT vs BLOB)

2004-06-18 Thread Matt Richards
Scott, As the quote suggests. If you require the ability to query those fields use TEXT, if you do not, use BLOB. Scott Fletcher wrote: I'm wrestling over deciding on which data type to go with, TEXT or BLOB. I have one table with one column of 400 characters, I was thinking that TEXT may be th

RE: [PHP] Re: sql query question

2004-02-12 Thread Hamid Hossain
n_id=zawraqclassif-20 Download Ready-Made Templates for your site: http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad Original Message Follows From: Ben Ramsey <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], tony <[EMAIL PROTECTED]> Subject: [PHP] Re: sql query question D

[PHP] Re: sql query question

2004-02-12 Thread Steve Solomon
select * from table where locate("new",descript)>0 or locate("car",descript)>0; "Tony" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] hi if i have new car and i want to search each word in description can i do SELECT * FROM table WHERE descript = "new" OR descript ="car"?? any hel

[PHP] Re: sql query question

2004-02-12 Thread Ben Ramsey
This is a SQL question, rather than a PHP question, so I would suggest doing a google search on SQL tutorials, but I think what you are trying to do would work like this: SELECT * FROM table WHERE descript LIKE '%new%' OR descript LIKE '%car%' Tony wrote: hi if i have new car and i want t

[PHP] Re: sql query and some math

2003-12-17 Thread Kim Steinhaug
Your first query, could it be that you dont have any reference between the two tables? You should have a link between them, like where t1.id=t2id Or else you do not have any reasonable way of predicting the outcome of the query. Atleast this is what I know from my own experience. Especially if

[PHP] Re: sql query and some math

2003-12-17 Thread Sven
Patrik Fomin schrieb: ... q2) i got like 100 matches from a database into a $num variable, then i want to devide that by 3 aslong as it can be done, eg: while ($num != 0) { ïf ($num / 3 = true){ some code to display some fields from a database $num = $num - 3; } else { some other code to display

RE: [PHP] Re: SQL Query

2003-02-15 Thread Willie G
ruary 15, 2003 11:01 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: SQL Query The result recived from that query is this ID SubID Interest Valid Edit Delete 4 3 Star Craft 1 But I want a Query that retrives "Star Craft", "Strategi", "Spel" and &qu

Re: [PHP] Re: SQL Query

2003-02-15 Thread Zydox
ERE > InterestList.SubID='3' AND > InterestList.Valid='1' > > > - Larry > > -Original Message- > From: Zydox [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 15, 2003 7:58 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: SQL Q

RE: [PHP] Re: SQL Query

2003-02-15 Thread Willie G
EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 7:58 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: SQL Query Those querys work... but they don't get all the Sub Interests... "Uttam" <[EMAIL PROTECTED]> wrote in message 97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE&q

[PHP] Re: SQL Query

2003-02-15 Thread Zydox
Those querys work... but they don't get all the Sub Interests... "Uttam" <[EMAIL PROTECTED]> wrote in message 97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE">news:97FB62E1E350D511B71F00A0C99D0CC30352D563@MSEXCHANGE... > if i understand you correctly then this should give valid interests of a

[PHP] RE: SQL Query

2003-02-15 Thread Uttam
if i understand you correctly then this should give valid interests of a user: SELECT DISTINCT InterestsList.SubID FROM InterestsIndex INNER JOIN InterestList ON InterestIndex.InterestID=InterestList.ID WHERE InterestIndex.UserID='1' AND InterestList.Valid='

[PHP] Re: SQL Query Question

2001-12-09 Thread Fred
You could simply execute a second query where score > $score and return the number of rows in the result + 1. For instance: $return = mysql_query("select ID, Name, Score, COUNT(Name) as total from members where ID = '$ID'"); $row = mysql_fetch_assoc($return); extract ($row); $return = mysql_quer