Posts

How to Find & Replace Data in MySQL

To find a string in a certain field and replace it with another string: update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

PHP - AJAX and XML

Image
AJAX can be used for interactive communication with an XML file. AJAX XML Example The following example will demonstrate how a web page can fetch information from an XML file with AJAX: Example: The HTML Page looks like as below CD info will be listed here... Example Explained - The HTML Page When a user selects a CD in the dropdown list above, a function called "showCD()" is executed. The function is triggered by the "onchange" event: <html> <head> <script type="text/javascript"> function showCD(str) { if (str=="")   {   document.getElementById("txtHint").innerHTML="";   return;  } if (window.XMLHttpRequest)   {// code for IE7+, Firefox, Chrome, Opera, Safari   xmlhttp=new XMLHttpRequest();   } else   {// code for IE6, IE5   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP

How to make remote connection in database?

The following is the process to make a remote connection in database: Use SQL Server Surface Area Configuration Tool for enabling the remote connection in database. Click on Surface Area Configuration for Services and Connections. Click on SQLEXPRESS/Database Engine/RemoteConnections Select the radio button: Local and Remote Connections and select ‘Using TCP/IP only’ under Local and Remote Connections. Click on OK button / Apply button

MySQL root password recovery

First log in to the system as the same person who is running the mysqld daemon (probably root). Kill the process, using the kill command. Restart MySQL with the following arguments: bin/mysqld Skip-grant USE mysql; UPDATE user SET password = password('newpassword') WHERE User = 'root'; Exit bin/mysqladmin reload The next time you log in, you will use your new password

Name a new feature introduced with PHP 5

PHP 5 introduces (among other things) SQLite support, improved XML support, and a significantly improved object model.

Will the include() statement slow down my scripts?

Because an included file must be opened and parsed by the engine, it will add some overhead. The benefits of reusable code libraries often outweigh the relatively low performance overhead, however.

Q: - Can I create arrays for values entered into elements other than select and check box fields?

Yes, in fact any element name ending with empty square brackets in a form resolves to an array element when the form is submitted. You can use this fact to group values submitted from multiple fields of any type into an array.