Sadda Hussain Sadda Hussain - 2 months ago 10
MySQL Question

How can we generate a table using mysql table

How Can we generate XML using this table

How Can we generate XML using this table

Answer

Do you want people here to write code for you? We are here to help only...

If you don't know how to start:

Here are the steps!

  • Create a PreparedStatement in PHP to get the data from mysql table.
  • After getting all the values.
  • Loop through your result set like
xmlString="";
while(rs.next())
{
 xmlString=xmlString+<tableData>+
 <id>+rs.get('id')+</id>+
 <name>+rs.get('name')+</name>+
 <address>+rs.get('address')+</address>+
 <phone>+rs.get('phone')+</phone>+
 </tableData>
}