By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

problem having a complete record from mysql_fetch_row

P: 2
i am trying to fetch a row from a table in database, every thing is coming all right except one. there is a column (of type text). when i save my record in it , saved correctly completely but when i want to fetch it, doesn't come up with complete data (but partially) from this column. i am using mysql_fetch_row($result). and the table is:
Expand|Select|Wrap|Line Numbers
  1.  
  2.        CREATE TABLE `site_page` (                                                                                                  
  3.                       `page_id` int(11) NOT NULL auto_increment,                                                                                     
  4.                       `page_type_id` int(11) NOT NULL,                                                                                               
  5.                       `page_menu_id` int(11) NOT NULL,                                                                                               
  6.                       `page_name` varchar(100) NOT NULL,                                                                                             
  7.                       `page_link` varchar(100) NOT NULL,                                                                                             
  8.                       `page_heading` varchar(255) default '',                                                                                        
  9.                       `page_content` text,                                                                                                           
  10.                       `page_title` varchar(255) default NULL,                                                                                        
  11.                       `meta_keywords` mediumtext,                                                                                                    
  12.                       `keyword_description` text,                                                                                                    
  13.                       `pic_small` varchar(255) default NULL,                                                                                         
  14.                       `pic_main` varchar(255) default NULL,                                                                                          
  15.                       `pic_size` varchar(50) default NULL,                                                                                           
  16.                       `pic_type` varchar(50) default NULL,                                                                                           
  17.                       `display_order` int(11) NOT NULL,                                                                                              
  18.                       `parent_page_id` int(11) NOT NULL,                                                                                             
  19.                       `status` varchar(20) NOT NULL,                                                                                                 
  20.                       `creation_date` date NOT NULL,                                                                                                 
  21.                       `last_update_date` date NOT NULL,                                                                                              
  22.                       PRIMARY KEY  (`page_id`),                                                                                                      
  23.                       KEY `Refusol_page_menu60` (`page_menu_id`),                                                                                    
  24.                       KEY `Refusol_page_type44` (`page_type_id`),                                                                                    
  25.                       CONSTRAINT `Refusol_page_menu60` FOREIGN KEY (`page_menu_id`) REFERENCES `usol_page_menu` (`page_menu_id`) ON DELETE CASCADE,  
  26.                       CONSTRAINT `Refusol_page_type44` FOREIGN KEY (`page_type_id`) REFERENCES `usol_page_type` (`page_type_id`) ON DELETE CASCADE   
  27.                     ) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=latin1
  28.  
regards
Dec 26 '11 #1
Share this Question
Share on Google+
1 Reply


P: 2
Expand|Select|Wrap|Line Numbers
  1. $extendQry = "";
  2.             if($mode != "admin"){
  3.                 $extendQry = "AND p.status='enable' ";
  4.             }
  5.              $qry = "SELECT p.page_id, p.page_link, p.page_name, p.page_heading, p.page_content, p.status, p.page_title,
  6.                             p.meta_keywords, p.keyword_description, p.pic_main, p.pic_small, p.parent_page_id, 
  7.                             t.page_type_id, t.page_type, m.page_menu_id, m.menu_type
  8.                        FROM usol_site_page p, usol_page_type t , usol_page_menu m
  9.                       WHERE p.page_id = ".$pageId." $extendQry
  10.                         AND t.page_type_id = p.page_type_id 
  11.                         AND m.page_menu_id = p.page_menu_id";
  12. $result = mysql_query($qry);
  13. return mysql_fetch_row($result);
  14.  
  15.  
the column page_content is not coming up with complete data by php or query browser

i solved it by changing the column type from text to mediumtext.
Dec 26 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.