Your Ad Here

Posted By

indianocean on 07/24/07


Tagged

sql java opencms


Versions (?)

Simple SQL Statement using OpenCMS


 / Published in: Java
 

  1. Connection connection = OpenCms.getSqlManager().getConnection("hf");
  2. Statement stmt = connection.createStatement();
  3. ResultSet rs = stmt.executeQuery("SELECT * FROM PRODUCTS");
  4.  
  5. while(rs.next())
  6. {
  7. Integer pid = rs.getInt("product_id");
  8. out.println(pid);
  9. }

Report this snippet  

You need to login to post a comment.