Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-2008, 06:37 PM
Junior Member
 
Join Date: Oct 2008
Posts: 2
Default Error in multy query

Hello, if I query my db (mysql) in this way it's work ! :

$db = Zend_Registry::get('db');
$sql = 'SELECT value1 FROM table WHERE id ='.$id;
$result = $db->query($sql);
$value = $result->fetchAll();

now, if I repeat the code 2 time it return me a generic error an not render the page:

$db = Zend_Registry::get('db');
$sql = 'SELECT value1 FROM table WHERE id ='.$id;
$result = $db->query($sql);
$value1 = $result->fetchAll();

$sql = 'SELECT value1 FROM table WHERE id ='.$id;
$result = $db->query($sql);
$value2 = $result->fetchAll();

Why ?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-06-2008, 06:33 AM
Junior Member
 
Join Date: Oct 2008
Posts: 2
Default

To post error's text, please
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-06-2008, 09:30 PM
Junior Member
 
Join Date: Oct 2008
Posts: 2
Default

This is my error : I repalce the path in this post with /......./

<br />

<b>Fatal error</b>: Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]:
Thanks

Last edited by stvlinux : 10-14-2008 at 04:11 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-16-2008, 04:55 AM
Senior Member
 
Join Date: Jun 2008
Location: Florida
Posts: 108
Default

Did you try running both independently. i.e. try doing the first one alone, then try running the second one alone.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:03 AM.