LAMPInterview

A Venture from AccuGlobal.com

Archive for the 'MYSQL' Category


write the function to fetch a image from mysql databases (datatype blob).

Posted by lampinterview on May 14, 2008

A BLOB is a binary large object that can hold a variable amount of data. The four BLOB  types are TINYBLOB, BLOB,
MEDIUMBLOB, and LONGBLOB. These differ only in the maximum length of the values they can hold. The four TEXT types are
TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. BLOB columns are treated as binary strings (byte strings).
TEXT columns are treated as non-binary strings (character strings). BLOB  columns have no character set, and sorting
and comparison are based on the numeric values of the bytes in column values. TEXT columns have a character set, and
values are sorted and compared based on the collation of the character set.

Posted in MYSQL | Tagged: | No Comments »

is ‘easyphp’ is compelete technology to design a phpmysql?

Posted by lampinterview on May 14, 2008

Yes,easyphp include webserver,php and mysql

Posted in MYSQL | Tagged: | 1 Comment »

How can we create a database using PHP and mysql?

Posted by lampinterview on May 14, 2008

mysql_create_db() is used to create database in mysql.

Posted in MYSQL | Tagged: | No Comments »

How can i set execution time out while fetching records from mysql?

Posted by lampinterview on May 14, 2008

Use set_time_limit() php function for setting up execution mysql time limit.

Posted in MYSQL, PHP | Tagged: , , | 2 Comments »

How can i insert single & double qotes in MySql database without using PHP?

Posted by lampinterview on May 14, 2008

You can use prepare() execute method or auto execute method in PEAR. It is just for quotes, but all the html characters to be stored in db.

Posted in MYSQL, PHP | Tagged: , , , , | 2 Comments »

How do i limit the no of rows 1 get out of my database?

Posted by lampinterview on May 7, 2008

– LIMIT

eg: select * from ‘tablename’ where ‘condition’ LIMIT 1;

Posted in MYSQL | Tagged: , | No Comments »

How can i fetch only the unique values in mysql?

Posted by lampinterview on May 7, 2008

– through DISTINCT function.

eg: select DISTINCT ‘fieldname’ from ‘tablename’ where ‘condition’

Posted in MYSQL | Tagged: , , | No Comments »

How an we get the ID genrated from the previous insert operation?

Posted by lampinterview on May 7, 2008

using mysql_insert_id() function.

Posted in MYSQL | Tagged: , , | No Comments »

How do i store binary in mysql?

Posted by lampinterview on May 7, 2008

Using BLOB data type.

Posted in MYSQL | Tagged: , , | No Comments »

What are the other commands to know the structure of a table using MySQL commands except EXPLAIN command in php?

Posted by lampinterview on May 7, 2008

The commands to know the structure of a table using MySQL is DESCRIBE table_name;

Posted in MYSQL | Tagged: , , , , , | No Comments »