RE: [PHP-DB] SQL question

2003-12-11 Thread brettking
try 

SELECT * FROM x_table WHERE name LIKE %part_of_name%

-Original Message-
From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
Sent: 11 December 2003 11:52
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SQL question


I know it is  possible to search a database like this:

SELECT * FROM x_table WHERE name=%part_of_name%

but I don't know for sure the correct command.

Could you tell me the right syntax?

TIA
Aurel.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Email has been scanned for viruses by www.emf-systems.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] array

2003-12-11 Thread brettking

Hi

From what I can work out you need to use a function called
in_array(value,array);
http://www.php.net/manual/en/function.in-array.php here is the php manual
link

Hope this is what you want
Brett
-Original Message-
From: peppe [mailto:[EMAIL PROTECTED]
Sent: 11 December 2003 16:07
To: [EMAIL PROTECTED]
Subject: [PHP-DB] array


Hi
I have a variable cold $access and there are values 1,2,3,4,5
How can I check for example
If ($access =='2'){
echo go further;
}
How can I make this work
Thanx in advance

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Email has been scanned for viruses by www.emf-systems.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php