Breakdown MYSQL Results [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am currently getting data from a database using PHP and echoing the data out using:
$data[0]
This displays a full list of account numbers, I am wanting to put a href around this so that when I click on each one of the account numbers it runs another MYSQL query which breaks down to more information based on the account number that has been clicked.
How can this be done?

The href could point to another script which evaluates the $_GET parameters and builds a query from it, like in
12345
and
<?php // details.php
...
mysql_query( "select * from mydata where id=$_GET['id']" );
This is just a pointer, and the example is prone to SQL injection etc.

Related

How can I create a list of top donors using php and mysql? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I would like to know how I can create a list of top donors, in which the user who donates the most is in the first position of the list.
In order to donate, you must be logged in
How can I do something like that using php and mysql?
This is only how much i understand your question.
First you need to create table for donors which the storage of their data, and 2nd is to make table for donate which holds the donator.
Then to sort the donator by donated the most, just use COUNT sql query to get the highest donate number.

Does the string "php?id=1" within a http GET request mean there is necesseraly an sql request to a back-end database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In order to find websites with potential sql injections, it is possible to use google dorks like "inurl:.php?id="
From the results that google will give, does it mean all the websites listed use sql database (mysql, oracle or any other)?
As it is a backend call, we can't exactly say, that it related to a Database as well. The reason is that while captured based on $_GET['id'], the returning value can be decided only upon the backend, solely based on PHP. So SQL connection is not essentially needed in that purpose.

How can I Print a result on webpage using php getting from MySql database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a school website, I have uploaded the students examination result to the database but now I want to make a search bar by which can the student search their result by typing their roll number.
please someone give me the code. please
#wajahat-aftab - you can always find a great tutorial to do this. Here are few of the links
https://www.youtube.com/watch?v=N_S7_wg87GU
http://html.net/tutorials/php/
http://www.htmlgoodies.com/beyond/php/article.php/3472391
Basically you need to get the data, manipulate it and send it to the HTML page. Once you get the data in HTML you can present it any kind of look-n-feel as per your needs.
You can not expect exact answers for such questions - so I suggest you to be more specific with QUESTION and make sure that you also share the source code that you tried so far.

is it possible to run a piece of external php code after each php statement? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
The problem is that I must catch situation when some variable (and I don't know it's name, that is I don't know where this value first arises) matches some record in database. The way I think it could be done is to run after each statement an external code against array of local and remote variables. In that external code would be a simple foreach loop and db query, the script would then output line number where given situation happened.
Is this possible with xdebug ?
There is a function for that, http://php.net/manual/en/function.register-tick-function.php more documentation on ticks is http://www.php.net/manual/en/control-structures.declare.php here.

Calling a field from database in MySQL [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
return(array($clientName,$salesPer,$prospectVal,$projID));
The projectID is dynamically added in database for each entry, now how can i return the ID. As i have not set any variable in PHP to map the database field.
Can anyone guide me on this.
If you're asking how to get back the ProjectID after it has been inserted into the database and automatically assigned, I suggest using something like the following:
$projID = mysql_insert_id();
immediately after running the insert statement.

Categories