-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstandard.php
More file actions
33 lines (30 loc) · 733 Bytes
/
standard.php
File metadata and controls
33 lines (30 loc) · 733 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
<?php
class db_connection
{
function db_connection()
{
$con = mysql_connect('localhost', 'root', 'rajeev');
$conn = mysql_select_db('Ryan',$con);
}
function db_fetch($query)
{
$result = mysql_query($query);
$i = 0;
while($rows = mysql_fetch_array($result))
{
if($rows[0]!=NULL)
{
$arr[$i++] = $rows[0];
}
}
return $arr;
}
function db_disconnection()
{
mysql_close($con);
}
}
/*
auto complete functionallity
*/
?>