Introduction
Query and PHP are two of the most popular programming languages used in web development. Query is a language used to query databases, while PHP is a scripting language used to create dynamic webpages. Both languages have their own advantages and disadvantages, and it is important to understand the differences between them in order to make the best decision for your project. This article will discuss the differences between Query and PHP, and provide some tips on when to use each language.
Solution
The main difference between a query and PHP is that a query is a language used to communicate with a database, while PHP is a scripting language used to create dynamic web pages.
A query is used to retrieve data from a database, while PHP is used to manipulate the data and display it on a web page. Queries are written in Structured Query Language (SQL), while PHP is written in a scripting language such as HTML, CSS, and JavaScript.
Queries are used to retrieve data from a database, while PHP is used to manipulate the data and display it on a web page. Queries are written in Structured Query Language (SQL), while PHP is written in a scripting language such as HTML, CSS, and JavaScript.
In summary, queries are used to communicate with a database, while PHP is used to create dynamic web pages.
With jQuery alone you can’t fetch data from mysql.
If your question is to load with the page or get the data from php after loading, I can say, that loading with page is better, because the text is standing on the page when you load it and jquery will have a delay to display the data.
$.ajax({url: 'ajax.php', success: function(data){$('#name').text(data.name)}});
solved QUERY versus PHP [closed]