Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
mysql_query problem... Probably a simple answer
Old 03-26-2005, 04:34 PM mysql_query problem... Probably a simple answer
TyR
TyR's Avatar
Super Talker

Posts: 139
Location: Frei - Norway
Trades: 0
Im getting kinda tired here and im trying to figure out whats wrong with this script:

PHP Code:
<?php
if ($page=="main"){

$result mysql_query ("select * from n1_forumgroups ORDER BY 'pos'");
while(
$forum mysql_fetch_array($result)){


$*** = 
mysql_query("SELECT * from 'n1_forumgroups' where 'id'='".$forum['id']."' ORDER BY 'pos' DESC");
$forumgroup mysql_fetch_array($***);
echo 
"
<tr>
<td class=\"subtop\"><span style=\"margin-left: 2px; font-weight: bold;\">"
.$forumgroup['title']."</span></td>
<td style=\"width: 64px;\" class=\"subtop\"><span style=\"margin-left: 2px;\">Topics:</span></td>
<td style=\"width: 64px;\" class=\"subtop\"><span style=\"margin-left: 2px;\">Replies:</span</td>
<td style=\"width: 168px;\" class=\"subtop\"><span style=\"margin-left: 2px;\">Last Post:</span></td>
</tr>
"
;
mysql_free_result($***);


$poop mysql_query("SELECT * from 'n1_forums' where 'parent'='".$forum['id']."' ORDER BY 'pos' DESC");
while(
$forum mysql_fetch_array($poop)){
echo 
"
<tr>
<td class=\"forumdesc1\">
<a href=\"#\"><span class=\"bold\">"
.$forum['title']."</span></a>
<br />
"
.$forum['description']."
</td>
<td class=\"forumdesc1\">65</td>
<td class=\"forumdesc1\">445</td>
<td class=\"forumdesc1\">135min ago.<br />by: TyR</td>
</tr>
"
;
}
mysql_free_result($poop);


}
}
?>
i just get alot o errors like:

Quote:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''n1_forumgroups' where 'id'='1' ORDER BY 'pos' DESC' at line 1
can anyone see whats wrong ?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by TyR; 03-26-2005 at 05:04 PM..
TyR is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-26-2005, 05:14 PM
TyR
TyR's Avatar
Super Talker

Posts: 139
Location: Frei - Norway
Trades: 0
nvm, me and my stupid quoutes >_<
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
TyR is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mysql_query problem... Probably a simple answer
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15476 seconds with 12 queries