Problem execute the Query

Reply

Join Date: Sep 2007
Posts: 9
Reputation: sujithfem is an unknown quantity at this point 
Solved Threads: 0
sujithfem sujithfem is offline Offline
Newbie Poster

Problem execute the Query

 
0
  #1
Apr 22nd, 2008
Hi,
I have a problem especially executing the query, I hope the problem due to special Character, i am using the ADOB for DB[MYSQL], Script is PHP, i have enclosed the function which make me hazard …….

  1.  
  2.  
  3. define('QRY_ALTER_CATEGORY', 'ALTER TABLE Category ADD %s');
  4.  
  5. function ChangeCategory($FieldName) {
  6. $Condition = $FieldName.' VARCHAR(20)';
  7. $Query = sprintf(QRY_ALTER_CATEGORY,$Condition);
  8. $this->core->DBConn->Execute($Query);
  9. }

The above Function use to Alter the Table Field name ,the problem is : if the Filed name is "Special character [íóÓéèÉÈÚúáàÁÀãñÑÖöÜüßÉ]” means the query is not execute other wise its works well ,please let me know the solution for the problem ,and expecting positive reply and advance thanks for the same .
"The fear of the Lord is the beginning of wisdom"
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 9
Reputation: sujithfem is an unknown quantity at this point 
Solved Threads: 0
sujithfem sujithfem is offline Offline
Newbie Poster

Re: Problem execute the Query

 
0
  #2
Apr 22nd, 2008
hi guys works fine after change the following Code
$Condition = '`' . $FieldName. '`' . ' VARCHAR(20)';
"The fear of the Lord is the beginning of wisdom"
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC