! 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
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
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
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
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
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
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
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
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
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
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
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='
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
13 matches
Mail list logo