我有这个代码
$(function() { $('#ans_vote a span').click(function(){alert('working');return false;});});
Run Code Online (Sandbox Code Playgroud)
和这个HTML
<div id="ans_vote">
<a href='#'><span>one</span></a>
</div>
<div id="ans_vote">
<a href='#'><span>two</span></a>
</div>
Run Code Online (Sandbox Code Playgroud)
当在mozilla中点击一个和两个它的工作但是当点击一个,即它的工作,但当点击两个它不工作
我有users桌子,我有posts桌子我想从users顶级用户中选择有大量的帖子来自posts表格并按照帖子的数量排序我可以array_count_values()通过我无法订购它现在我认为如果我通过一个mysql通过left和join查询会更好
表结构
posts
Run Code Online (Sandbox Code Playgroud)
id | auther_id
我试过这个
SELECT COUNT(1) cnt, u.user_id
FROM users u
LEFT JOIN posts p
ON p.author_id=u.user_id
GROUP BY u.user_id
ORDER BY cnt DESC
LIMIT 20
Run Code Online (Sandbox Code Playgroud)
它给了我这个 alt文本http://img511.imageshack.us/img511/6707/31154352.gif 看到箭头是什么这个我只有2个帖子在user_id 5下这是第一行是什么
我有这个
http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNFyHi2aIJIV7kAlui1Sd_MQGosiBA&url=http://ksa.daralhayat.com/ksaarticle/192445
Run Code Online (Sandbox Code Playgroud)
我想得到url = only 的值
我收到这个错误
可捕获的致命错误:类 __PHP_Incomplete_Class 的对象无法转换为 user.php 中第 248 行的字符串,这是该行
function loadUser($userID)
{
global $db;
$res = $db->getrow("SELECT * FROM `{$this->dbTable}` WHERE `{$this->tbFields['userID']}` = '".$this->escape($userID)."' LIMIT 1");
if ( !$res )
return false;
$this->userData = $res;
$this->userID = $userID;
$_SESSION[$this->sessionVariable] = $this->userID;
return true;
}
Run Code Online (Sandbox Code Playgroud)
看
var_dump($_SESSION);
array(1) { ["user"]=> &object(__PHP_Incomplete_Class)#1 (12) { ["__PHP_Incomplete_Class_Name"]=> string(11) "jooria_user" ["dbTable"]=> string(5) "users" ["sessionVariable"]=> string(4) "user" } }
Run Code Online (Sandbox Code Playgroud) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body{ font-size: 12px; font-family: Arial; }
</style>
<script type="application/javascript" src="jquery-1.4.2.min.js"></script>
</head>
<body>
<b>Footer navigation:</b>
<div id="new-nav"></div>
<div id="new-nav1"></div>
<script type="application/javascript">
jQuery(document).ready(function(){
$("#new-nav").load("test/index1.php");
$("#new-nav").ajaxStop(function(){
$("#new-nav1").load("test/index1.php")
});
});
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我想使用jQuery load将我的两个PHP页面部分加载到我的主页面,但它可以在Firefox中运行,而不是在IE中运行 - 问题出在哪里?
在使用此功能后的阿拉伯语页面中
function getNodeOuterHTML($n) {
$d = new DOMDocument('1.0');
$b = $d->importNode($n->cloneNode(true),true);
$d->appendChild($b);
$h = $d->saveHTML();
return utf8_decode($h);
}
Run Code Online (Sandbox Code Playgroud)
它给"رام الله"它的阿拉伯语工作叫"رامالله"
我如何将其转换为阿拉伯语文本,它出现在浏览器阿拉伯语中但不在源代码中