Press enter to see results or esc to cancel.

Export MySQL Table in to CSV file using JAVA

In this video I have shown how you can export MySQL table into a CSV file. You will need to import MySQL jar file into class path of eclipse IDE to work on this program. You can download here, mysql-connector-java-5.1.42-bin.rar 1. Project Structure in Eclipse IDE. 2.Create_CSV.java package com.chillyfacts.com; import java.io.File; import java.io.PrintWriter; import java.sql.Connection; …

Continue reading

How to create CSV file using java

In this video I have shown how you can create a CSV file or Comma Separated Values file using java. The below source code is explained in the video, Create_CSV.java package com.chillyfacts.com; import java.io.File; import java.io.PrintWriter; public class Create_CSV { public static void main(String[] args) { try { PrintWriter pw= new PrintWriter(new File(“C:\\Users\\MIRITPC\\Desktop\\csv\\books_table.csv”)); StringBuilder sb=new …

Continue reading

Hide .php extensions, Custom url for PHP pages with parameters, htaccess

In this video I have shown how you can have custom URL for you PHP web site. It is done by htaccess file, Please note that htaccess file should be created in ROOT folder of your project. 1. Project files Web pages 2. index.php <a href=”index.php”>INDEX</a> | <a href=”ABOUT”>ABOUT</a> | <a href=”PRODUCT”>PRODUCT</a> | <a href=”CONTACT”>CONTACT</a> …

Continue reading

Connect MySQL database using PHP and Select values from Table

In this video I have shown how you can Connect to your MySQL database and select values from the table in that database. Here in this example I am connecting to local host MySQL database Connect to Database with below code <?php echo ‘Hello<br>’; $hostname=’localhost’; $username=’root’; $password=’root’; $database=’test’; $conn=new mysqli($hostname,$username,$password,$database); if(!$conn){ die(‘Error In connection’.mysqli_connect_error()); }else{ …

Continue reading

JAVA – Send SOAP XML Request and Read Response

In the video I have shown how you can create an XML request and send to an endpoint URL, Then receive the response from the server. You can send both get request and post request with below examples. Send_XML_Post_Request_1.java and Send_XML_Post_Request_2.java are 2 different example codes. Send_XML_Post_Request_1.java package com.chillyfacts.com; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputStreamReader; …

Continue reading

Failed to load : No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore not allowed access.

In this video I have shown how you can over come the error, Failed to load : No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore not allowed access. This error is because of Cross-Origin Resource Sharing (CORS) issue. This simply means that you are trying access information from other domain which …

Continue reading