ankurgupta555
unread,May 10, 2011, 7:02:20 AM5/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to penc...@googlegroups.com
//sql statement
$sql = "SELECT `tagjoins`.*, `tags`.`tag_name` FROM `tagjoins` INNER JOIN `tags` ON tags.tag_id = tagjoins.tag_id WHERE tagjoins.bmk_id = '12'";
//pdo
try{ $dbh = new PDO("mysql:dbname=my_ahaweb;host=localhost","root", "pass"); }catch(PDOException $e){ echo $e->getMessage(); exit(); }
$sth = $dbh->prepare($sql);
$sth->execute();
$r = $sth->fetchAll();
print_r($r);
//zend framework : inside a model which extends Zend_Db_Table
$stmt = $this->getAdapter()->query($sql);
$r = $this->fetchAll($stmt);
print_r($r);
उपरोक्त कोड को ध्यान से देखें।
पहले हिस्से में पीडीओ की सहायत से जब आदेश का क्रियान्वयन किया जाता है तो वो आराम से हो जाता है।
पर जब ठीक उसे आदेश का क्रियान्वयन जेंड फ्रेमवर्क के पुर्जों से करते हैं तो निम्नलिखित त्रुटि संदेश आता है:
Message: SQLSTATE[42000]: Syntax error or access violation: 1064
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near '' at line
1
कई सारे फोरमों में पूछा पर कोई सही उत्तर नही मिला। अब पेंचकस ग्रुप में प्रयास कर रहा हूं।
पता नही कहां गड़बड़ है। समझ में नही आ रहा है। मैं तो कल रात से पक गया हूं।