0

Hi,

I am trying to develop a blog and stuck up in managing the blogs.

The logic with which I am working is that the user who has logged in should be able to see his or her own blog to manage it of course. Now for this I have successfully inserted the email in my blog table, thanks to this forum.

In order to show the blogs the user has written, I have made the following code.

if (isset($_SESSION['MM_Username'])) {
  $colname_rec_manage_blog = $_SESSION['MM_Username'];
}
mysql_select_db($database_con_reg, $con_reg);
$query_rec_manage_blog = sprintf("SELECT * FROM blog WHERE email.blog = %s", GetSQLValueString($colname_rec_manage_blog, "text"));

This code does not do anything... Gives me a blank record, however the blog has been successfully added in the database. It should pick the blog looking at the email field in the table. It does not give me any error either.

Any help regarding this would be highly appreciated.

Regards,

Bilal A. Khan

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by BilalAKhan
0

You've created the query string, but haven't run it (mysql_query).

0

You've created the query string, but haven't run it (mysql_query).

Sorry for not posting the whole code. Please see the whole code:

if (isset($_SESSION['MM_Username'])) {
  $colname_rec_manage_blog = $_SESSION['MM_Username'];
}
mysql_select_db($database_con_reg, $con_reg);
$query_rec_manage_blog = sprintf("SELECT * FROM blog WHERE email.blog = %s", GetSQLValueString($colname_rec_manage_blog, "text"));
$query_limit_rec_manage_blog = sprintf("%s LIMIT %d, %d", $query_rec_manage_blog, $startRow_rec_manage_blog, $maxRows_rec_manage_blog);
$rec_manage_blog = mysql_query($query_limit_rec_manage_blog, $con_reg) or die(mysql_error());
$row_rec_manage_blog = mysql_fetch_assoc($rec_manage_blog);

I have set the mysql_query() as well. Can you please help me out now.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.