Jump to content

GraphiX

Members
  • Posts

    26
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

GraphiX's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Complete w3schools section on it http://www.w3schools.com/PHP/php_file.asp
  2. Viewing on a PC the layout is kinda unclear and the rollovers are raping my vision however I don't know if this looks any better on the iPhone. The blog looks nicely made but again the layout hurts. Mabey consider having the view comments PHP script included in the Blog post and having a link to the add section. This keeps it in check with the layouts of other blogsand makes it more user friendly. As for suggestions, mabey look into a forum and if you have some spare time, do your own layout. GraphiX
  3. Just Solved this, it fas an error in my functions file, SILLY ME!!! Thanks for all your help GraphiX
  4. Well, now from where I see it this is pretty much hopeless, now that the SQl is actually in the mysql_query function, there are no variables to lose. I know the SQL syntax is ok, because PHPmyAdmin parsed it with no errors. the only thing that could be affecting it is the PHP syntax on the actual statement. Any Suggestions? (I'm off now for tonight, be back on tommorow.)
  5. I know it is kind of stupid, the code looks fine so I am throwing this out there: Are you sure you are connecting to the right database? Yeah, i'm pretty sure. I googled around a bit and most of these have ended up unsolved.
  6. Youtube already does this, look for some hannel embed codes on your channel.
  7. When the query (With the varible set to 7) was entered into PHPmyAdmin it returned this SELECT * FROM `forum_topics` WHERE `cid` = '7'; And the result it should have. I don't see why it won't work in my Script.
  8. It's still returning Query is Empty", it has never done this before
  9. Returns This: SELECT * FROM `forum_topics` WHERE `cid`='7'Query was empty [table][tr][td][table][tr][td]Title[/td][td]User[/td][td]Date[/td][td]Replies[/td][/tr][/table][/t] [/td][/tr][/table] Sorry if i'm a bit clueless but this bewilders me.
  10. would display as a number I think, never used that method though.
  11. $sql = "SELECT * FROM `table`"; $query = mysql_query($sql) or die(mysql_error()); echo mysql_num_rows($query) I think that would work. The way you're doing it would also work.
  12. I did escape my tags but when I posted the Board stripped the slashes on the code.
  13. I belive it was something to do with the query to the query variable not being recognised by the mysql_query fucnction but I can'tsee anything wrong with either bit of code...
  14. When I execute the following code, there is an error before the table is echoed reading "Query was Empty", also no data is diaplayed in the table even though there are records in the database. } else { $sql2 = "SELECT * FROM `forum_topics` WHERE `cid`='" . $row['id'] . "'"; $res2 = mysql_query($sql2) or die(mysql_error()); if (mysql_num_rows($res2) == 0) { echo "There no topics to display in this forum. <a href="./index.php?act=create&id=".$row['id']."">Click Here</a> to create one. "; } else { echo "<table border="0" cellspacing="3" cellpadding"3"> "; echo "<tr align="center"><td>Title</td><td>User</td><td>Date</td><td>Replies</td></tr> "; while ($row2 = mysql_fetch_assoc($res2)) { #$sql3 = "count(*) AS `num_replies` FROM `forum_replies WHERE `tid`='".$row2['id']."'"; #$res3 = mysql_query($sql3) or die(mysql_error()); #$row3 = mysql_fetch_assoc($res3); echo "<tr><td><a href="index.php?act=topic&id=".$row2['id'].">".s($row2['title'])."</a></td><td>".uid($row2['uid'])."</td><td>".$row2['date']."</td><td>".$row3['num_replies'] . "</td></tr> "; } echo "</table> "; } } } } else { echo "Please supply a catergory ID."; } ?> Hope you Can Help Me! GraphiX
  15. Could be more central as there is not much content.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.