Showing posts with label LAMP. Show all posts
Showing posts with label LAMP. Show all posts

Qucik MYSQL PHP Tips ( IN CLAUSE)

MYSQL 4 does not allow IN (Select ...) .
So what you do is execute a query , generate a long set of values in then execute the query .

Cavet : SQL buffer can over flow


MYSQL Supports ( Select ..... in ( .... ) )

Oracle and PHP Tutorial - Easy




Simple : Encrypt passwords in database


The crypt function lets you encrypt text
here is how

= crypt('mypassword'); // let the salt be automatically generated
// do this to encrypt
the password

//use $password in your (insert into.......) code
}
?>

For retrieval



if (crypt($_REQUEST['pass'], $password) == $password) {
echo
"Password verified!";

.......
?>