 |
boardom b2 message board
|
View previous topic :: View next topic |
Author |
Message |
babyqrl
Joined: 15 Jun 2004 Posts: 1
|
Posted: Tue Jun 15, 2004 10:30 pm Post subject: Table error |
|
|
I tried using the code for tables, but it gave me this:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/sandy/public_html/sandra/index.php on line 40
this is what I have so far:
<?php
/* Don't remove these lines. */
$blog = 1;
require('wp-blog-header.php');
// Uncomment the next line if you want to track blog updates from weblogs.com
//include_once(ABSPATH.WPINC.'/links-update-xml.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/1">
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="WordPress <?php echo $wp_version; ?>" /> <!-- leave this for stats -->
<style type="text/css" media="screen">
@import url( <?php echo $siteurl; ?>/wp-layout.css );
</style>
<link rel="stylesheet" type="text/css" media="print" href="<?php echo $siteurl; ?>/print.css" />
<link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php get_archives('monthly', '', 'link'); ?>
<?php //comments_popup_script(); // off by default ?>
</head>
<body>
<table border=0 cellspacing=0 width="90%">
<!-- // b2 loop start -->
<tr>
<td align=justify">
<?php while($row = mysql_fetch_object($result)) { start_b2(); ?>
<?php the_date("l, F jS Y","<h1>","</h1>"); ?>
<?php permalink_anchor(); ?>
<h2><?php the_title(); ?></h2>
<div class="post">
<?php the_content(); ?><?php link_pages("<br />Pages: ","<br />","number") ?> </div>
<span class="byline">post number <?php the_author_posts() ?> by <strong><?php the_author() ?></strong> @ <a href="<?php permalink_link() ?>"><?php the_time() ?></a> | category: <?php the_category() ?> | <?php comments_popup_link("any comments?", "a single comment", "% comments!") ?></span>
<br /><br /><br /><br />
</td>
</tr>
<!-- // this is just the end of the motor - don't touch that line either --> <?php } ?>
</table>
<div id="rap">
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
<div id="content">
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<?php the_date('','<h2>','</h2>'); ?>
<div class="post">
<h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<div class="meta">Filed under: <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
<div class="storycontent">
<?php the_content(); ?>
</div>
<div class="feedback">
<?php link_pages('<br />Pages: ', '<br />', 'number'); ?>
<?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?>
</div>
<!--
<?php trackback_rdf(); ?>
-->
<?php include(ABSPATH . 'wp-comments.php'); ?>
</div>
<?php } } else { // end foreach, end if any posts ?>
<p>Sorry, no posts matched your criteria.</p>
<?php } ?>
</div>
<div id="menu">
<ul>
<?php get_links_list(); ?>
<li id="categories">Categories:
<ul>
<?php list_cats(0, 'All', 'name'); ?>
</ul>
</li>
<li id="search">Search:
<form id="searchform" method="get" action="<?php echo $PHP_SELF; /*$siteurl."/".$blogfilename*/ ?>">
<div>
<input type="text" name="s" size="15" /><br />
<input type="submit" name="submit" value="search" />
</div>
</form>
</li>
<li id="archives">Archives:
<ul>
<?php get_archives('monthly'); ?>
</ul>
</li>
<li id="calendar">
<?php get_calendar(); ?>
</li>
<li id="other">Other:
<ul>
<li><a href="<?php echo $siteurl; ?>/wp-login.php">login</a></li>
<li><a href="<?php echo $siteurl; ?>/wp-register.php">register</a></li>
</ul>
</li>
<li id="meta">Meta:
<ul>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="Syndicate this site using RSS"><abbr title="Really Simple Syndication">RSS</abbr> 2.0</a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="The latest comments to all posts in RSS">Comments <abbr title="Really Simple Syndication">RSS</abbr> 2.0</a></li>
<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
<li><a href="http://wordpress.org" title="Powered by WordPress, state-of-the-art semantic personal publishing platform">WP</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p class="credit"><!--<?php echo $wpdb->querycount; ?> queries.--> <?php timer_stop(1); ?> || <cite>Powered by <a href="http://wordpress.org" title="Powered by WordPress, state-of-the-art semantic personal publishing platform"><strong>WordPress</strong></a></cite></p>
</body>
</html> |
|
Back to top |
|
 |
Timi
Joined: 23 Jul 2003 Posts: 89 Location: Hungary
|
Posted: Fri Jun 18, 2004 3:27 pm Post subject: |
|
|
Pasting this PHP site into Macromedia Dreamweaver doesn't give it a red color, so the php code itself is damaged, or you've deleted a slash or anything by accident, so I recommend opening the original index file and pasting the codes in the place of the current ones. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB 2 © 2001, 2002 phpBB Group
|