Mysql text field<br/>

hi everybody,

my problem,

xml/php code


<?php
include_once("connection.php");
$key = mysql_result(mysql_query("SELECT product_id FROM product_read WHERE id='1' "),0);
$result = mysql_query("SELECT * FROM jos_product WHERE product_id='".$key."' ");
$data=mysql_fetch_object($result);
 
echo '<?xml version="1.0" encoding="iso-8859-9"?>'; 
echo '<images>';
if ($data->big_image!="" OR $data->caption!=""){
echo '<pic>'; 
echo "<image> ".$data->big_image." </image>"; 
echo "<caption> ".$data->caption." </caption>"; /*mysql type text*/
echo '</pic>';
}
echo '</images>'; 
?>

xml print


[COLOR=#0000ff]<?xml version="1.0" encoding="iso-8859-9" ?>[/COLOR] 
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]images[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]pic[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]image[/COLOR][COLOR=#0000ff]>[/COLOR]**images/product/big_image/1.jpg**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]image[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]caption[/COLOR][COLOR=#0000ff]>[/COLOR][COLOR=#000000]**test 123 test 123 test 123 test 123 test 123 test 123**[/COLOR][COLOR=#0000ff]</[/COLOR][COLOR=#990000]caption[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]pic[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]images[/COLOR][COLOR=#0000ff]>[/COLOR]

as


System.useCodepage = true;
function loadXML(loaded) {
 if (loaded) {
  xmlNode = this.firstChild;
  image = [];
  description = [];
  total = xmlNode.childNodes.length;
  for (i=0; i<total; i++) {
   image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
   description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
  }
  firstImage();
 } else {
  content = "file not loaded!";
 }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("flashc.php?" + Math.random());
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
 if (Key.getCode() == Key.LEFT) {
  prevImage();
 } else if (Key.getCode() == Key.RIGHT) {
  nextImage();
 }
};
Key.addListener(listen);
previous_btn.onRelease = function() {
 prevImage();
};
next_btn.onRelease = function() {
 nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
 if(current_pos == 1){
  previous_btn._visible = false;
 } else {
  previous_btn._visible = true;
 }
 if(current_pos == total){
  next_btn._visible = false;
 } else {
  next_btn._visible = true;
 }
 filesize = picture.getBytesTotal();
 loaded = picture.getBytesLoaded();
 preloader._visible = true;
 if (loaded != filesize) {
  preloader.preload_bar = 100*loaded/filesize;
 } else {
  preloader._visible = false;
  if (picture._alpha<100) {
   picture._alpha += 10;
  }
 }
};
function nextImage() {
 if (p<(total-1)) {
  p++;
  if (loaded == filesize) {
   picture._alpha = 0;
   picture.loadMovie(image[p], 1);
   _root.desc_txt.htmlText = description[p] **[COLOR=red]+"<br />";[/COLOR]**
   picture_num();
  }
 }
}
function prevImage() {
 if (p>0) {
  p--;
  picture._alpha = 0;
  picture.loadMovie(image[p], 1);
  _root.desc_txt.htmlText = description[p] **[COLOR=red]+"<br />";[/COLOR]**
  picture_num();
 }
}
function firstImage() {
 if (loaded == filesize) {
  picture._alpha = 0;
  picture.loadMovie(image[0],1);
  _root.desc_txt.htmlText = description[0] **[COLOR=red]+"<br />";[/COLOR]**
  picture_num();
 }
}
function picture_num() {
 current_pos = p+1;
 pos_txt.text = current_pos+" / "+total;
}

flash photo gallery description print

test 123

test 123

test 123

test 123

[SIZE=2]the flash print i want is the same as the sample
[/SIZE]
test 123
test 123
test 123

?

Don’t you need to use a foreach statement, or a while statement to make the XML nodes repeat?

include_once("connection.php");
$key = mysql_result(mysql_query("SELECT product_id FROM product_read WHERE id='1' "),0);
$result = mysql_query("SELECT * FROM jos_product WHERE product_id='".$key."' ");

echo '<?xml version="1.0" encoding="iso-8859-9"?>'; 
echo '<images>';
while($data = mysql_fetch_array($result)){
 if ($data['big_image']!="" OR $data['caption']!=""){
 echo '<pic>'; 
 echo "<image> ".$data['big_image']." </image>"; 
 echo "<caption> ".$data['caption']." </caption>"; 
 echo '</pic>';
 }
}
echo '</images>';

Try that
Ben

The thing I want is to arrey the datas line by line, in text area of MYSQL. The problem I face is I get this datas with an empty space between every line. How can I fix this and get the data line by line without any space.
I think I put <br/> in wrong place , can you please explain the correct place to put this. Also for your information my code is working perfectly.

Thanks in advance

In a text area of MySQL…I’m sorry I don’t really get what you mean.

My code does make an XML file with no spaces…I think