User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 429,888 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,277 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums

MySQL syntax error 1064

Join Date: Feb 2008
Posts: 300
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: MySQL syntax error 1064

  #26  
Mar 27th, 2008
the record is meant to be displayed within a table on the homepage. i have changed the code now so that it no longer displayed the message something is in the database and just left the new select line in and still nothing is being displayed.

the code for the full page looks looke this

<body onload="MM_preloadImages('global/home_over.gif','global/refurbs_over.gif','global/setups_over.gif','global/contact_over.gif')">
<?php
include ('includes/db_inc.php');
?>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td>&nbsp;</td>
        <td><img src="global/navTop.gif" width="370" height="60" /></td>
    </tr>
    <tr>
        <td><img src="global/logo.gif" alt="CMS Services" width="370" height="65" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','global/home_over.gif',1)"><img src="global/home_off.gif" alt="Home" name="home" width="370" height="17" border="0" id="home" /></a></td>
                </tr>
                <tr>
                    <td><a href="refurbishment/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('refurbs','','global/refurbs_over.gif',1)"><img src="global/refurbs_off.gif" alt="Refurbishment Projects" name="refurbs" width="370" height="15" border="0" id="refurbs" /></a></td>
                </tr>
                <tr>
                    <td><a href="setups/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('setups','','global/setups_over.gif',1)"><img src="global/setups_off.gif" alt="Set Ups &amp; Dismantles" name="setups" width="370" height="16" border="0" id="setups" /></a></td>
                </tr>
                <tr>
                    <td><a href="contact/index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','global/contact_over.gif',1)"><img src="global/contact_off.gif" alt="Contact CMS Services" name="contact" width="370" height="17" border="0" id="contact" /></a></td>
                </tr>
            </table></td>
    </tr>
    <tr>
        <td><img src="global/navSpacer.gif" width="10" height="20" /></td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><img src="images/img_home.jpg" width="370" height="160" /></td>
        <td><img src="images/header_home.gif" width="370" height="160" /></td>
    </tr>
</table>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td width="185" bgcolor="#F1DECB"><table width="185" border="0" cellspacing="0" cellpadding="10">
            <tr>
                <td bgcolor="#002C54" class="textWhite">&nbsp;</td>
            </tr>
        </table></td>
        <td width="20">&nbsp;</td>
        <td width="535" background="global/pageBg.gif"><table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
					<?php
						
						$sql= "SELECT * FROM cms_core WHERE id= '1'";
						$query = mysql_query($sql);
						$result = mysql_fetch_array($query);
						
					?>								
				</td>
            </tr>
        </table></td>
    </tr>
</table>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td><img src="global/footer.gif" width="740" height="70" /></td>
    </tr>
    <tr>
        <td><div align="center">
            <p class="footer">&copy; CMS Services. All rights reserved. </p>
        </div></td>
    </tr>
</table>
</body>
</html>
Reply With Quote  
All times are GMT -4. The time now is 8:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC