$message = $_SESSION['wall'][] = $message;
if ($_SESSION['wall']) {
foreach($_SESSION['wall'] as $message) {
echo '<p class="msg">'. $message .'</p>';
}
}
private int getCountLines (boolean allElements)
{
int countLines = 0;
try {
String query = "SELECT COUNT(*) FROM " + tableName;
if (allElements) {
query += this.where;
}
Statement stmt = connection.createStatement();
ResultSet resultSet = stmt.executeQuery(query);
resultSet.next();
countLines = resultSet.getInt(1);
} catch (SQLException e) {
e.printStackTrace();
}
return countLines;
}
private int getCountLines ()
{
return getCountLines(true);
}