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

  • Home
  • SEARCH
  • 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 6070425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:55:54+00:00 2026-05-23T09:55:54+00:00

Hi i have the following query/table from a local bookstore $queryadmin =SELECT last_name, first_name,

  • 0

Hi i have the following query/table from a local bookstore

$queryadmin ="SELECT last_name, first_name, user_id FROM users";
$recordz = @mysqli_query ($dbc, $queryadmin);

while ($row = mysqli_fetch_array($recordz, MYSQLI_ASSOC)) {
echo '<tr>
<td align="left">' . $row['first_name'] . '</td>
<td align="left">' . $row['last_name'] . '</td>
<td align="left">' . $row['user_id'] . '</td>
</tr>'
;} 

now i want an additional column from another table where the numbers of books each user has lend out are displayed.
So the query if nested seperately would go something like this

$query2 = mysql_query("SELECT FROM mirror3 WHERE userid='".$row['user_id']."'", $link); 
$anzahl = mysql_num_rows($query2);  

placing this query nested inside the while query (right after while starting) from above does not work. How to do that?

supplied argument is not a valid MySQL
result resource

thanks

  • 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-05-23T09:55:55+00:00Added an answer on May 23, 2026 at 9:55 am

    Your query is wrong. Specify a field name:

    $query2 = mysql_query(“SELECT
    SOMETHING FROM mirror3 WHERE userid='”.$row[‘user_id’].”‘”, $link);

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

Sidebar

Related Questions

Can I have a prepared statement with the following query: select * from table
i have the following query: select * from table where table.DateUpdated >='2010-05-03 08:31:13:000' all
Lets say I have the following query. SELECT stringdata FROM table ORDER BY FIELDS(
I have the following query SELECT * FROM table WHERE id IN (5,4,3,1,6) and
I have the following query in MySQL: SELECT sid, date FROM table WHERE wid
I have the following SQL query: SELECT * FROM table WHERE field_1 <> field_2
Let's say I have the following query: SELECT anInteger FROM table; How do I
I have the following query: select column_name, count(column_name) from table group by column_name having
I have the following query: SELECT COLUMN1, COLUMN2, COUNT(*) FROM TABLE WHERE COLUMN3 IS
I have the following query: SELECT * FROM table WHERE tags LIKE '%$search%' AND

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.