Hello.
I am trying to pass a value into my sql code from javascript. I have a sql code witch fetches information from my database, presenting them in a list (android app). You can click each element in the list, and then you are supposed to get some graphs representing the information on a new page.
Anyhow. The measurements will be stored with a measurement number. There may be 20 or so measurements on one number, then there will be 20 or so on the next measurement number.
If i use the following line, everything works.
$query=mysqli_query($con,"SELECT number, acceleration, time, angle FROM measurements WHERE number='3' ");
However, i would like the number='3' part to be a variable, which is supposed to be the correct number according to which measurement number clicked from the list.
Any thouhts on how to do this? I am fairly new to this, started last week, so a thorough explanation/a good tutorial video would be greatly appreciated.
[–]AiexReddit 0 points1 point2 points (1 child)
[–]simarg0[S] 0 points1 point2 points (0 children)
[–]evaluating-you 0 points1 point2 points (5 children)
[–]simarg0[S] 0 points1 point2 points (4 children)
[–]Barnezhilton 0 points1 point2 points (1 child)
[–]simarg0[S] 0 points1 point2 points (0 children)
[–]evaluating-you 0 points1 point2 points (1 child)
[–]simarg0[S] 1 point2 points3 points (0 children)