Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7896801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:59:15+00:00 2026-06-03T07:59:15+00:00

in mysql db table varchar title(20) – db table column. title: Banana™ – table

  • 0

in mysql db table

  varchar title(20) - db table column. 
  title: Banana™  - table row.      

in return.php (server)

 $get_query=$_GET['query'];

 $connect=mysql_connect("localhost","root","") or die("die");

mysql_select_db("testdb",$connect);

$query=mysql_query($get_query,$connect);

while($row = mysql_fetch_array($query ))
{
$list[]=$row;

 }

print json_encode($list);

mysql_free_result($query);

mysql_close($connect);

in ios (client)

NSString * szURL =[NSString stringWithFormat:@"http://localhost/return.php?query=%@",query]; 

NSURL *url = [NSURL URLWithString:[szURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding ]];

NSString *strData = [NSString stringWithContentsOfURL:url
                                             encoding:NSUTF8StringEncoding
                                                error:&error];

NSDictionary *rootItem = (NSDictionary *)[strData JSONValue];
NSArray * appLists= (NSArray *)rootItem;

NSMutableArray *resultArray =[[[NSMutableArray alloc]init] autorelease];

for(NSDictionary * oneApp in appLists)
{   
   NSString *appTitle=(NSString*)[oneApp objectForKey:@"title"];

 }

but appTitle is NULL;

I think , I need to covert character.

™ is problem.
How I get Banana™ by (NSString *)??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:59:17+00:00Added an answer on June 3, 2026 at 7:59 am

    Maybe the problem is here:

    NSDictionary *rootItem = (NSDictionary *)[strData JSONValue];
    NSArray * appLists= (NSArray *)rootItem;
    

    Is it an Array or a Dictionary? Check this out before iterate over appLists. A NSLog to [strData JSONValue]; can be really useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have title (varchar), description (text), keywords (varchar) fields in my mysql table. I
Assuming two columns in a MySQL (MyISAM) table: title VARCHAR(1500) url VARCHAR(155) I want
I have a MySQL table with a column of well-formed URLs. I'd like to
I have a MySQL table with an autoincremented id column. The id started from
I have created a table using below mensioned query in MySQL. CREATE TABLE Pat_Visit
CREATE TABLE post( 'id' int UNSIGNED AUTO_INCREMENT, 'title' VARCHAR(100), 'content' VARCHAR(5000), 'writer' VARCHAR(100), 'updated_at'
I have two tables in a MySql DB: items id (char) name (varchar) description
My MySQL table is simple. I have 3 fields: an index a url a
In this MySQL table definition: CREATE TABLE groups ( ug_main_grp_id smallint NOT NULL default
I have a MySQL table with the following data (simplified): INSERT INTO `stores` (`storeId`,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.