Tag Archives: VARCHAR

Php Interview Questions and Answers – Part 8

Php Interview Questions and Answers




Php Interview Questions and Answers – Part 8 1- Give the syntax of REVOKE commands? The generic syntax for revoke is as following REVOKE [rights] on [database] FROM [username@hostname] Now rights can be: a) ALL privileges b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc. We can grant rights on all database by using *.* or some specific database by database.* or a specific table by database.table_name. 2- What is the difference between CHAR and VARCHAR data types? […]

Php Interview Questions and Answers – Part 3

php-interview-questions-answers




1- What is the difference between CHAR and VARCHAR data types? CHAR is a fixed length data type. CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, “Hello!” will be stored as “Hello! ” in CHAR(10) column. VARCHAR is a variable length data type. VARCHAR(n) will take only the required storage for the actual number of characters entered to that column. For example, “Hello!” will be stored as “Hello!” […]

How to Login with Facebook and Twitter

facebook_twitter_login




As we know Facebook and Twitter have become large in the social network world and both networks offering oAuth support. Nowadays web users not interested to filling the big registration forms. This tutorial helps you to avoid registration forms, It’s is very useful and simple to integrate. Database: Sample database users table columns id, email, oauth_uid, oauth_provider and username. CREATE TABLE users ( id INT PRIMARY KEY AUTO_INCREMENT, email VARCHAR(70), oauth_uid VARCHAR(200), oauth_provider VARCHAR(200), username VARCHAR(100), twitter_oauth_token VARCHAR(200), twitter_oauth_token_secret VARCHAR(200) […]

MySQL Best Practices

MySQL Best Practices




Database operations often tend to be the main bottleneck for most web applications today. It’s not only the DBA’s (database administrators) that have to worry about these performance issues. We as programmers need to do our part by structuring tables properly, writing optimized queries and better code. Here are some MySQL optimization techniques for programmers.