Jump to content

[SOLVED] Best way to do this?


LooieENG

Recommended Posts

For each blog post, I dunno whether to echo

<a href="index.php?u=ID">user</a>

or

<a href="index.php?u=user">user</a>

 

I'd prefer ?u=ID, but then for each blog post would I have to perform a MySQL query to get the name of the user who posted it, or is there another way?

 

Thanks

Link to comment
Share on other sites

Surely anyway wouldn't you need to call the body of the blog post, title of the blog post, etc..?

If I was doing the same thing, I would also have an author field in the same table. In which case, it wouldn't be that difficult to add an extra line or so to get the author from the database.

 

But ID's are the best way to retrieve hierarchical data, or any kind of data to be honest.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.