dataflow1117@gmail.com
FacebookTwitter

en English
af Afrikaanssq Albanianam Amharicar Arabichy Armenianaz Azerbaijanieu Basquebe Belarusianbn Bengalibs Bosnianbg Bulgarianca Catalanceb Cebuanony Chichewazh-CN Chinese (Simplified)zh-TW Chinese (Traditional)co Corsicanhr Croatiancs Czechda Danishnl Dutchen Englisheo Esperantoet Estoniantl Filipinofi Finnishfr Frenchfy Frisiangl Galicianka Georgiande Germanel Greekgu Gujaratiht Haitian Creoleha Hausahaw Hawaiianiw Hebrewhi Hindihmn Hmonghu Hungarianis Icelandicig Igboid Indonesianga Irishit Italianja Japanesejw Javanesekn Kannadakk Kazakhkm Khmerko Koreanku Kurdish (Kurmanji)ky Kyrgyzlo Laola Latinlv Latvianlt Lithuanianlb Luxembourgishmk Macedonianmg Malagasyms Malayml Malayalammt Maltesemi Maorimr Marathimn Mongolianmy Myanmar (Burmese)ne Nepalino Norwegianps Pashtofa Persianpl Polishpt Portuguesepa Punjabiro Romanianru Russiansm Samoangd Scottish Gaelicsr Serbianst Sesothosn Shonasd Sindhisi Sinhalask Slovaksl Slovenianso Somalies Spanishsu Sudanesesw Swahilisv Swedishtg Tajikta Tamilte Teluguth Thaitr Turkishuk Ukrainianur Urduuz Uzbekvi Vietnamesecy Welshxh Xhosayi Yiddishyo Yorubazu Zulu

DataInFlow
DataInFlow
A Market place of programming
  • Home
  • Tutorial
    • HTML Tutorial
    • PHP TUTORIAL
  • Article
    • Technology
    • Entertainment and News
    • Game
    • Recipes
  • Queries
  • Programming
    • HTML
    • CSS
    • jQuery
    • JavaScript
    • WordPress
    • PHP
    • Codeigniter
    • Laravel
    • Ionic
    • Angular JS
    • Node JS
    • Vue JS
    • Android
    • ASP .NET
  • Sports
    • Cricket
    • Football
    • Football Live Score
  • Web Tools
  • Home
  • Tutorial
    • HTML Tutorial
    • PHP TUTORIAL
  • Programming
  • Queries
  • Sports
    • Cricket
    • Football
    • Football Live Score
  • Article
    • Entertainment and News
    • Technology
    • Recipes
    • Game
  • Web Tools
  • About Us
  • Contact

Database error occurred in codeigniter

862 viewsAugust 24, 2018codeigniter
0
Atanu Chakraborty (anonymous) Posted August 23, 2018

In codeigniter 404 page not found when database error occurred. When I try to fetch data from MySQL using Hebrew character in where clause.

My code is:

1
2
3
4
5
<?php
$uri_segment=end($this->uri->segments);
$se_query=$this->db->query("SELECT * FROM tours WHERE tour_slug='".$uri_segment."'");
$sec_data=$se_query->result_array();
?>

My URL is:
http://example.com/tour-details/מופע-פלמנקו

How can I fetch data using Hebrew character in where clause, which Hebrew character get from URL.

0 Comments

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Rana Samanta (anonymous) Posted August 24, 2018

You need to use this code urldecode($uri_segment);

For example:

1
2
3
4
5
6
7
<?php
$uri_segment1=end($this->uri->segments);
$uri_segment=urldecode($uri_segment1);
//echo $uri_segment;
$raw_query=$this->db->query("SELECT * FROM tbl_tours WHERE tour_slug='".$uri_segment."'");
$sec_data=$raw_query->result_array();
?>

 
Output: SELECT * FROM tours WHERE tour_slug=’שלום’

Select 0 Comments
Write your answer.
Register or Login
Question and answer is powered by AnsPress.io
Subscribe to our Newsletter
Search anything
Questions
How to display success message after submit form value in php 2 Answers | 0 Votes
Should The Government Pay For IT Education? 9 Answers | 0 Votes
What are the top 10 question answer website for programming? 9 Answers | 0 Votes
Fatal error: Uncaught Error: Call to undefined function mysql_connect() 2 Answers | 0 Votes
How to set a session variable in laravel 5.2 4 Answers | 0 Votes
Recent Programming Article
  • Menu hide from sidebar in ionic 3
    August 23, 2018
  • Generate bootstrap modal in angular 6
    August 23, 2018
  • Load more results functionality with jQuery , Ajax and PHP
    August 23, 2018
  • Facebook login with JavaScript SDK
    August 23, 2018
  • Facebook login in Codeigniter and MySQL
    August 23, 2018
Hire us

Hi
Do you want to make web application with php and php framework(CI, Laravel)? Want to make android application with hybrid framework ? Then contact with us. We provide support for developing website and web application at very affordable price.
E-Mail us at: dataflow1117@gmail.com

Recent Technlogy News
  • Astrology Software: Perfect Tool for Astrologers to Earn Money Online
    August 23, 2018
  • Actionable Steps to Secure Workplace for Dummies
    August 23, 2018
  • The Best Spy Glasses in 2019 You Can Buy now
    August 23, 2018
© Copyright 2017-2018 DataInFlow

About Us    Privacy policy    Contact us

Login

Lost your password?

Reset Password

Log in