-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpStuff.php
More file actions
36 lines (28 loc) · 955 Bytes
/
Copy pathphpStuff.php
File metadata and controls
36 lines (28 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
$servername = "localhost";
$username = "root";
$password = "awesomeman";
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
mysqli_select_db("Codelinc", $conn);
$q1 = "select *
from person, provider, event, attendance where EventDate >= (CurDate() - INTERVAL 30 DAY) and Email = PersonEmail and EventLocation = Location and EventProvider = Provider and EventDate = Date and EventProvider = ProviderName;";
$q2 = "select Name, County, Address, ReceiveFoodStamp from person";
$queries = array(
1 => $q1,$q2
);
foreach($queries as $query) {
$result = mysqli_query($query,$conn);
while ($row = mysqli_fetch_assoc($result)) {
foreach($row as $key => $value) {
echo "$key = $value <br />";
}
echo "<br/>";
}
echo "---------------------<br/>";
}
mysqli_close($conn);
?>