SET @rank=0;
SELECT u.* FROM
(
SELECT @rank:=@rank+1 AS rank, id, art, login
FROM users
ORDER BY art DESC
) u where u.login = 'Boris';
curl 'http://yandex.ru/search/?lr=213&text=hello' -X POST -x yandex.ru:80 -v -o /dev/null
* Connected to yandex.ru (5.255.255.5) port 80 (#0)
> POST http://yandex.ru/search/?lr=213&text=hello HTTP/1.1
> Host: yandex.ru
> User-Agent: curl/7.43.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 404 Not Found
< Date: Fri, 04 Sep 2015 08:05:16 GMT
< Content-Type: text/html; charset=UTF-8
< Cache-Control: no-cache,no-store,max-age=0,must-revalidate
< Expires: Fri, 04 Sep 2015 08:05:16 GMT
< Last-Modified: Fri, 04 Sep 2015 08:05:16 GMT
< P3P: policyref="/w3c/p3p.xml", CP="NON DSP ADM DEV PSD IVDo OUR IND STP PHY PRE NAV UNI"
< Set-Cookie: yandexuid=7466500011441353916; Expires=Mon, 01-Sep-2025 08:05:16 GMT; Domain=.yandex.ru; Path=/
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Content-Length: 21783
<
{ [861 bytes data]
100 21783 100 21783 0 0 126k 0 --:--:-- --:--:-- --:--:-- 126k
* Connection #0 to host yandex.ru left intact
ini_set('memory_limit','2048M');
<input name="fileAttach[]" id="attach" type="file" required multiple>
foreach($_FILES["fileAttach"]["name"] as $i => $strFilesName) {
$tmp_name = $_FILES["fileAttach"]["tmp_name"][$i];
....
}
<?php
$a = array(
"0-1439802876-55d1a5fc8879e.jpg",
"1-1439802876-55d1a5fc8ed30.jpg",
"2-1439802876-55d1a5fc95a91.jpg",
);
$b = array(
"0-1440719577-55dfa2d9195ec.jpg",
"2-1440719577-55dfa2d93572b.jpg",
"3-1440719577-55dfa2d951c51.jpg",
);
$a = array_combine(array_map(function ($v) {
return substr($v, 0, strpos($v, '-'));
}, $a), $a);
$b = array_combine(array_map(function ($v) {
return substr($v, 0, strpos($v, '-'));
}, $b), $b);
print_r($a+$b);
$array = array_map("str_getcsv", explode("\n", str_replace(";",",",$csv)));
...
if($res->execute()){
header('Location: http://www.websmash.net/article/index.php?id='.$id);
}else{
$arr = $res->errorInfo();
print_r($arr);
}
...
$.post('/convert/i.html/convertor.php', ...
<?php
// Соединиться с сервером БД
mysql_connect("localhost", "admin", "pass") or die (mysql_error ());
// Выбрать БД
mysql_select_db("admyapp7_search") or die(mysql_error());
// SQL-запрос
$strSQL = "SELECT * FROM news";
// Выполнить запрос (набор данных $rs содержит результат)
$rs = mysql_query($strSQL);
// Цикл по recordset $rs
// Каждый ряд становится массивом ($row) с помощью функции mysql_fetch_array
while($row = mysql_fetch_array($rs)) {
echo '<div class="news">';
echo '<p class="datenews">' . $row['date'] . '<br /></p>';
echo '<p class="titlenews">' . $row['text'] . '<br /></p>';
echo '</div>';
}
// Закрыть соединение с БД
mysql_close();
<link rel="stylesheet" type="text/css" href="D:/Server/OpenServer/domains/php.loc/templates/style.css">
<link rel="stylesheet" type="text/css" href="templates/style.css">