Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8910429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:41:16+00:00 2026-06-15T03:41:16+00:00

I’m trying to display the result of an MYSQL select count as a hyperlink

  • 0

I’m trying to display the result of an MYSQL select count as a hyperlink in PHP.

When I output the result as plain text it works with this line.

Print"<th>Meeting count:</th> <td>".mysql_result($result2,0) . "</td> ";

But when I try it in a hyperlink it either comes up with the resource pointer ID or completely blank.

Here’s the line I’m trying using mysql_fetch_assoc at the moment.

$rec = mysql_fetch_assoc($result2,0);
Print "<td><a href='userprofile3.php?profileID=$profileID'>$rec</a></td>";

I have a feeling I’m missing a character in this line

The profileID is generated from my other query

$profileID = $info['userID']; 

And here is the query where the count is generated

$result2 = mysql_query(“select count(meetingCode) FROM meeting where meeting.userID = $profileID AND SUBSTRING( meetingCode, 5, 2 )
BETWEEN 12
AND 22
AND SUBSTRING( meetingCode, 7, 2 )
BETWEEN 1
AND 12
AND SUBSTRING( meetingCode, 9, 2 )
BETWEEN 01
AND 31”);

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:41:17+00:00Added an answer on June 15, 2026 at 3:41 am

    You’re fetching an associative array using mysql_fetch_assoc() (which, by the way, only takes one parameter! You’re running without PHP errors, so you probably didn’t see it). This is NOT a string/string-convertible variable.

    However, what it does have is the name of all the columns in the format $rec['columnName']. I can’t correct your code as I do not know the name of your columns, but it should be simple for you to edit your code. One thing, though – if you don’t concatenate, you’lll need to use {$rec['columnName']}.

    One last thing. All mysql functions have been deprecated in favour of PDO and MySQLi. Switch to them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I would like to count the length of a string with PHP. The string
I'm trying to select an H1 element which is the second-child in its group
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.