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 8029819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:33:04+00:00 2026-06-05T00:33:04+00:00

After process a tiny search engine with ajax-jQuery, and functions in PHP, I’ve a

  • 0

After process a tiny search engine with ajax-jQuery, and functions in PHP, I’ve a Array JSON and I want process this for append rows in table exists but I get confused.

The JSON format from query mysql is OK, but I don’t know how process data to generate table or append in my exists table.

I think that is applied each for taking each element of JSON but I can not think as.

Note: My JSON Code was generate to this this way

       ...........
       $jsonSearchResults = array();
                while ($row = mysql_fetch_assoc($result)) {
                    $jsonSearchResults[] =  array(
                        'clavemat' => $row['cve_mat'],
                        'tipomat' => $row['tipo_mat'],
                        'titulomat' => $row['titulo_mat'],
                        'autormat' => $row['autor_mat'],
                        'editmat' => $row['edit_mat'],
                        'success' => 'success'  
                    );
                }
         echo json_encode ($jsonSearchResults);

Table HTML

.........
<table class="busqueda">
<tr>
<th scope="col">Clave</th>
<th scope="col">Tipo</th>
<th scope="col">Título</th>
<th scope="col">Autor</th>
<th scope="col">Editorial</th>
</tr>
</table>
........

JSON CODE

[
{
"clavemat":"LICOELMCUS",
"tipomat":"Libro",
"titulomat":"Contabilidad",
"autormat":"Elias Flores",
"editmat":"McGraw Hill",
"success":"success"
},
{
"clavemat":"LICUDEMCNU",
"tipomat":"Libro",
"titulomat":"Curso java",
"autormat":"Deitel",
"editmat":"McGraw Hill",
"success":"success"
},
{
"clavemat":"REECMUMUNU",
"tipomat":"Revista",
"titulomat":"Eclipses",
"autormat":"Muy Interesante",
"editmat":"Muy interesante",
"success":"success"
},
{
"clavemat":"TEPLPLTENU",
"tipomat":"Tesis",
"titulomat":"Platanito Show",
"autormat":"Platanito",
"editmat":"Telehit",
"success":"success"
}
]

AJAX.JQUERY FILE

$.ajax({
            type: "POST",
            url: action,
            data: dataSearch,
            success: function (response) {

                if (response[0].success == "success") {
                    alert("Si hay datos");
                } else {
                    alert("No hay datos");
                }

            }
        });
        return false;
    });
  • 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-05T00:33:06+00:00Added an answer on June 5, 2026 at 12:33 am

    This should work

    $.each(response, function (index, record) {
        var row = $("<tr />");
        $("<td />").text(record.clavemat).appendTo(row);
        $("<td />").text(record.tipomat).appendTo(row);
        $("<td />").text(record.titulomat).appendTo(row);
        $("<td />").text(record.autormat).appendTo(row);
        $("<td />").text(record.editmat).appendTo(row);
    
        row.appendTo("table.busqueda");
    });
    

    The above code appends rows to an existing table with class “busqueda”.

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

Sidebar

Related Questions

After creating a child process and exiting it immediately (_exit()), I want to perform
after read this article i tried generate EF model by System.Diagnostics.Process: Process myProcess =
how can i kill a process after every second.i want to set a timer
I want to be able to kill my old process after a code update
How to put two arguments into the Argument property, And after run process this
I want to make the result (Returning result of the heavy process) accessible after
I'm using curl to fetch some data from a website. After I process it
I am getting the order information after the checkout process is finished and I
After a button is clicked to start a process on my web app, I
After a while I figured out I could bind Shark to the process of

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.