Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit/modify retrieved values from mysql database
05-25-2014, 07:31 AM
Post: #1
Edit/modify retrieved values from mysql database
Hi friends. I want to php code on how i can modify my retrieved database values from a particular table before echoing out. Please could you help me correct the code. Or if there is any better way of editing loop datas before printing out, please kindly drop the code for me. Thanks

PHP Code:
<?php    
$q 
"SELECT * FROM threads WHERE catid='2'";
  
$get $database->query($q) or die(mysql_error());
 
$row=mysql_fetch_row($get);

$value=$row['0']['title'];
$one='first value'
echo 
$value.$one;

$value=$row['1']['name'];
$two='second value'
echo 
$value.$two;

$value=$row['2']['category'];
$three='third value'
echo 
$value.$three;
?>
please if there is any better way of editing loop values from mysql database before printing out, please kindly drop the code for me. Thanks
Find all posts by this user
Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)