Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 21-12-2004, 09:17 PM   #1 (permalink)
Apprentice
 
Join Date: Sep 2004
Location: Thimphu
Posts: 87
Default PHP probb.......


Folk,

Its really been a long time am hooked up in this problem, i did manage to make a little change in it ..plz hlp ....belwo is my source code and table.


Note : Plz run it and u will see what my prob is
************************************************** *********

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn = "localhost";
$database_conn = "tol";
$username_conn = "root";
$password_conn = "";
$conn = mysql_pconnect($hostname_conn, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR);
?>

<?php
mysql_select_db($database_conn, $conn);
$query_Recordset1 = "SELECT title, content, link FROM news";
$Recordset1 = mysql_query($query_Recordset1, $conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<table width="200" border="1" cellspacing="0">
<tr>
<?php
do {
?>
<td><?php echo $row_Recordset1['title']; ?></td>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
</tr>
<?php
mysql_data_seek($Recordset1, 0);
?>
<tr>
<?php
do {
?>
<td><?php echo $row_Recordset1['content']; ?></td>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
</tr>
<?php
mysql_data_seek($Recordset1, 0);
?>
<tr>
<?php
do {
?>
<td><?php echo $row_Recordset1['link']; ?></td>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
</tr>
</table>
<?php
mysql_free_result($Recordset1);
?>
<div id="mxloopercomment">Generated with MX Looper trial!</div>



************************************************** ********


# --------------------------------------------------------

#
# Table structure for table `news`
#

CREATE TABLE `news` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(200) NOT NULL default '',
`content` longtext NOT NULL,
`author` varchar(20) NOT NULL default '',
`link` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=10 ;

#
# Dumping data for table `news`
#

INSERT INTO `news` VALUES (1, 'JPEG', 'WindowPCs that are unpatched are vulnerabe to attacks by harmless image files. Picture in the JPEG ', 'karma', '/more.php');
INSERT INTO `news` VALUES (3, 'Thsechu', '<img src=http://localhost/tol.com/images/mask.jpg width=47 height=47 border=1>\r\n <img src=http://localhost/tol.com/images/phob.jpg width=47 height=47 border=1>
\r\nForm of arts and craft through \r\n centuries of influence by its culture...', 'BlasterZalmon', 'BlasterZalmon');
INSERT INTO `news` VALUES (4, 'Highlights', '<img src=http://localhost/tol.com/images/mask.jpg width=47 height=47 border=1>\r\n <img src=http://localhost/tol.com/images/phob.jpg width=47 height=47 border=1>
\r\nForm of arts and craft through \r\n centuries of influence by its culture...', 'asasa', 'sasasa');
__________________
Flip like a butterfly, sting like a bee
Butterfly is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 23-12-2004, 10:06 AM   #2 (permalink)
Right Off the Assembly Line
 
Join Date: Nov 2004
Location: India
Posts: 46
Default

i have run the script and it seems to be ok.....
Still i am not an expert in php.
ironcross77 is offline  
Old 23-12-2004, 10:08 PM   #3 (permalink)
Apprentice
 
Join Date: Sep 2004
Location: Thimphu
Posts: 87
Default

Iron,

Thanks for going through, yeah its working fine , but something is wrong in it , did u find any thing odd at the top row of the table ,....

like say, it has to to 3 colums and 3 rows, in that one extra is added and the top of the "tile" its in wrong place ..

can u do that for me plz....thanks a lot

happy christmas and newyear too
__________________
Flip like a butterfly, sting like a bee
Butterfly is offline  
Old 24-12-2004, 01:11 PM   #4 (permalink)
Apprentice
 
Join Date: Sep 2004
Location: Thimphu
Posts: 87
Default

Hellow Wake Up Folks
__________________
Flip like a butterfly, sting like a bee
Butterfly is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by topgear
- by abhidev
- by clmlbx
- by Sarath

Advertisement




All times are GMT +5.5. The time now is 04:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2