Jump to content

MCP

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

MCP's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think you just need to add all the fields to the group by. try this: [code] SELECT BlogPost.BlogPostID, ImgSrc, PostTitle, PostText, BlogPost.DateTime, Category, Deleted, User.Name, COUNT(BlogPostComment.BlogCommentID) AS CommentCount FROM BlogPost JOIN User USING (userID) RIGHT JOIN BlogPostComment ON BlogPost.BlogPostID = BlogPostComment.BlogPostID WHERE BlogPost.Deleted = '0' GROUP BY BlogPost.BlogPostID, ImgSrc, PostTitle, PostText, BlogPost.DateTime, Category, Deleted, User.Name [/code]
  2. It seems kind of a waste to create an entire database just for a single table. If you're worried about security, create a separate ID (mixed mode authentication?), that only has the appropriate rights to the new table, and use that ID to connect to the database to save your users' new tutorials. So, I say just a new table, as there are no real security benefits to a separate database (assuming that's what you mean be safer?).
  3. I don't use this method myself, but you have to set mssql.secure_connection = On in the php.ini file. Or, you can turn on mixed mode authentication in SQL Server, and then go the username/password method.
  4. try something like this: Main differences is it stores $item_name in an array so you keep track of all the profiles, not just the last one; as well as looking to open and read $dir\$file, instead of $file. [code]$dir = "uploads\\crew_files"; if (is_dir($dir)) { $dp = open($dir);     while ($item = readdir($dp)) {         if ($item != "." && $item != ".." ) {         $file[] = $item;         $item_name[] = strtok($item,'.');         }     }     if($pd) {     closedir($dp);     } } for ($i=0, $i<count($file); $i++ ) { $npart = $dir."\\".$file[$i];     if (is_file($npart)) {     $fp = fopen($npart, 'rb');         if( $line = fgetcsv($fp, 100, "\t")){         echo "<div id=\"crew">                 <table width=\"400px\">                 <tr><td rowspan=\"4\"><img src=\"upload/crew_pix/{$item_name[$i]}.jpeg\"></td>                 <td>$line[0]</td></tr>                 <tr><td>$line[1]</td></tr>                 <tr><td>$line[2]</td></tr>                 <tr><td>$line[3]</td></tr>                 </table>                 </div> ";         }     } } [/code] your html might be a bit wonky too..
×
×
  • 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.