PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 15th, 2009, 05:52 AM
ravikapa ravikapa is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 ravikapa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 18 sec
Reputation Power: 0
Select query probelm in mdb2 package

i have table in database(mysql) is: user
and i have the data in user table
when the page is open in my application the data in user table is
like bellow

abc | xyz |123| apple


and in the application i have 3 buttons
those are update , edit and cancel buttons

when i click edit button it will fetch the data from data base(Mysql)
and display in the form

it's working fine


but if i updated with new data it's updating sucessfully in database(ex: iam updating old data(Apple in user table) with Mango(new data)).

this also working fine in appliction

the problem is if i click EDIT button.now it's feteching old data(i.e the data what is available when i opened application EX:apple(old data ie before update stament data))


pls help regarding this problem

Reply With Quote
  #2  
Old July 15th, 2009, 07:51 AM
wiesemann wiesemann is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 172 wiesemann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 2 m
Reputation Power: 3
Maybe you want to show us (the relevant parts of) your code? The described problem doesn't sound like a bug in MDB2.

Reply With Quote
  #3  
Old July 15th, 2009, 08:36 AM
ravikapa ravikapa is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 ravikapa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 18 sec
Reputation Power: 0
Quote:
Originally Posted by wiesemann
Maybe you want to show us (the relevant parts of) your code? The described problem doesn't sound like a bug in MDB2.



$types = array("text");

$statement = $this->db->prepare("SELECT first_name FROM users WHERE user_id = ?", $types, MDB2_PREPARE_RESULT);
$data = array('37');
$resultset = $statement->execute($data);
if(PEAR::isError($resultset)) {
die('failed... ' . $resultset->getMessage());
}

$statement->Free();
while($row = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC)) {
print "Found : " . $row['first_name'] . "\n";
}


or




else{
//$this->db->setFetchMode(MDB2_FETCHMODE_ASSOC);
//$this->db =& initialize_database($dsn,true);
$result = $this->db->queryRow("SELECT user_id,first_name,last_name,email_address,active, is_admin,is_project_manager FROM users WHERE user_id='$userId'");
$kk="SELECT user_id,first_name,last_name FROM users WHERE user_id=$userId";
$data = $this->db->extended->getRow($kk, array('integer', 'text', 'text'));
print('extendtedd-->'.$data['first_name']);
}

$result1 = $this->db->query("SELECT user_id,first_name,last_name,title,email_address,a ctive,is_sibson, is_admin,is_project_manager FROM users WHERE active='Y'");

if($this->db->isError($result1) || count($result1)<1){ return false;}

$row1 = $result1->fetchRow();
$this->db->setFetchMode(DB_FETCHMODE_ORDERED);
print('row1->'.$row1[1][2].'<--');

if($this->db->isError($result)){ return false;}

//$row = $result->fetchRow();
//$this->db->setFetchMode(DB_FETCHMODE_ORDERED);
//if(count($row)<1) return false;
print('first Name-->'.$result['first_name']);

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > Select query probelm in mdb2 package


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek