0

In a local database:

I have a field

content

in a table where I store numbers and symbols in the following format

{1,2,1,3,1,4,1,1,1} ∪ {1,2,198,776,455,666}

When I ran the query in my php code

SELECT * FROM table

and echo it in the web browser only

{1

is displayed I would like to mention that I used UTF-8 encoding for all my php scripts
and in addition when I connect to the database I use the following to set the charset

mysql_set_charset('utf8',$connection);
4
Contributors
5
Replies
30
Views
4 Years
Discussion Span
Last Post by masterjiraya
0

CREATE TABLE db.content (
id INT NOT NULL AUTO_INCREMENT ,
que_id INT NULL ,
que_content VARCHAR(300) NULL ,
form VARCHAR(300) NULL ,
PRIMARY KEY (id) );

$que = mysql_query("SELECT id FROM content");

Edited by kyriacos1986

0

From the query youve shown, you are only retrieving the ID,
what is in 'que_id' and 'que_content' and 'form', You are not requesting them in your query.
You need something like

$query=mysql_query("SELECT * FROM content"):
while ($row=mysql_fetch_array($query))
{
$id=$row['id'];
$qid=$row['que_id'];
$content=$row['que_content'];
$form=$row['form'];
}

echo $id."<br>".$qid."<br>".$content."<br>".$form;

to echo out all of the db content, and you can filter out what you don't need.

0

I cannot distinguish your field data to where these math symbols and numbers were stored. can u have sample data for this topic?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.