if(isset($_GET['tableid'])) {
....
}
<table class="users-information-statics-panel-DL">
<? mysql_query("SET NAMES 'utf8'",$bd_connect);
$result_table = mysql_query("SELECT * FROM " . $tableid . " ORDER BY `refvklad` DESC",$bd_connect);
do{
echo "<tr><td class='style-table'>".$myrow['id']."</td>";
echo "<td class='style-table'>".$myrow['nickname']."</td>";
echo "<td class='style-table'>".$myrow['refvklad']."</td>";
echo "<td class='style-table'>".$myrow['refsumma']."</td></tr>";
}while ($myrow = mysql_fetch_array($result_table)); ?>
</table>
$(document).ready(function() {
var a = '1';
var b = '2';
getText(a);
function getText(text) {
$.ajax({
type: "POST",
data: {parametr: text},
url: "text.php",
success: function (text) {
$('#box').empty();
$('#box').append(text);
}
});
}
$(document).on(
'click',
'a',
function(){
getText(b);
}
);
});
if($_POST['parametr'] == '1'){
$block_1 = '<p>some text</p>';
echo $block_1;
} else if($_POST['parametr'] == '2'){
$block_2 = '<p>another some text</p>';
echo $block_2;
}
function getPrice() {
$.ajax({
type: "POST",
data: {operation: 'getprice'},
url: "index.php",
dataType: "json",
success: function (json) {
}
});
}
function getPrice() {
$.ajax({
type: "POST",
data: {operation: 'getprice'},
url: "index.php",
success: function (data) {
$('#price').empty();
$('#price').append(data);
}
});
}
SELECT dialogs.id_dialog AS id, clients.name AS name, SUM(case when messages.status = 0 then 1 else 0 end) AS qt
FROM dialogs INNER JOIN clients ON dialogs.id_client = clients.id_client INNER JOIN
messages ON dialogs.id_dialog = messages.id_dialog WHERE dialogs.id_manager = '1' GROUP BY dialogs.id_dialog