Final Keyword: What Are The Two New Error Levels Introduced in PHP5.3?
Final Keyword: What Are The Two New Error Levels Introduced in PHP5.3?
the definition with final. If the class itself is being defined final then it cannot be extended.
Explain drupal flow of information among 5 main layers Basically, there are 5 main layers in Drupal where information flows, 1. Data (Node, ETC) 2. Modules 3. Blocks and Menus 4. User Permissions 5. Template
Persistent connections: Persistent connections remain connected even after your script has ended, which means that the next time a script asks for a connection, it uses the one that is already open - this saves a lot time negotiating passwords and such that can otherwise be used to execute important code. Switching to persistent connections does not require any other change than adding a "p" in the function name -
Session and Cookies: The most significant differences between the two are that cookies are stored on the client, while the session data is stored on the serve. As a result, sessions are more secure than cookies (no information is being sent back and forth between the client and the server) and sessions work even when the user has disabled cookies in their browser. Cookies, on the other hand, can be used to track information even from one session to another by setting it's time( ) parameter Sessions in PHP are started by using the session_start( ) function. Like the setcookie( ) function, the session_start( ) function must come before any HTML The session_start( ) function generates a random Session Id and stores it in a cookie on the user's computer (this is the only session information that is actually stored on the client side.) SessionID can be stored on a cookie or in the URL What is meant by MVC (Model View Controller)? MODEL VIEW CONTROLLER, is a software architecture, currently considered an architectural pattern used in software engineering. This isolates business logic from presentation logic. 1. The Model represents the application data 2. The View renders a presentation of model data 3. The Controller handles and routes requests made by the client.
Whats the difference between LEFT, RIGHT, INNER, OUTER, JOIN? The difference is in the way tables are joined if there are no common records. JOIN is same as INNER JOIN and means to only show records common to both tables. Whether the records are common is determined by the fields in join clause. For example: FROM t1 JOIN t2 on t1.ID = t2.ID means show only records where the same ID value exists in both tables. LEFT JOIN is same as LEFT OUTER JOIN and means to show all records from left table (i.e. the one that precedes in SQL statement) regardless of the existance of matching records in the right table. RIGHT JOIN is same as RIGHT OUTER JOIN and means opposite of LEFT JOIN, i.e. shows all records from the second (right) table and only matching records from first (left) table.
Auto Increment id in Mysql There is a structure of a table with an auto-increment ID.Last inserted id is 2145. What will be the next ID after following conditions? o o o Delete from tablename? Delete from tablename where ID=2145 Truncate table tablename
How to Generate Random Numbers using php? You can generate Random Numbers using php: follow the code. <? srand(time()); $random = (rand()%9); print("random number between 0 and 9 is: $random"); ?>
Stored procedures, Triggers, Indexes What are the advantages of stored procedures, triggers, indexes? Stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients dont need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.
A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.
Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data.
What is the difference between $message and $$message? Answer 1: $message is a simple variable whereas $$message is a reference variable. Example: $user = bob is equivalent to $holder = user; $$holder = bob; Answer 2: They are both variables. But $message is a variable with a fixed name. $$message is a variable whos name is stored in $message. For example, if $message contains var, $$message is the same as $var.
What are the reasons for selecting LAMP (Linux, Apache, MySQL, Php) instead of combination of other software programs, servers and operating systems? All of those are open source resource. Security of linux is very very more than windows. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other scripting language.
How can we create a database using PHP and MySQL? We can create MySQL database with the use of mysql_create_db("Database Name")
What is CAPTCHA? CAPTCHA stands for Completely Automated Public Turing Test to tell Computers and Humans Apart. To prevent spammers from using bots to automatically fill out forms, CAPTCHA programmers will generate an image containing distorted images of a string of numbers and letters.