-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodes.php
65 lines (54 loc) · 1.71 KB
/
codes.php
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
include ("includes/initialize.php");
global $database;
echo '<br>---------------------Check Slider Model---------------------------------<br>';
$s = new Slider_mo();
$s->gamer();
$s = new Slider();
echo '<br>---------------------Select All Record---------------------------------<br>';
$rts = $s->find_all();
//print_r($rts);
foreach ($rts as $row)
{
echo $row->name, "<br>";
}
echo '<br>-------------------- Find Where ----------------------------------<br>';
$rts = $s->find_Where(" id >3 ");
//print_r($rts);
foreach ($rts as $row)
{
echo $row->name, "<br>";
}
echo '<br>---------------------Find Record (2)---------------------------------<br>';
$rts = $s->find_by_id(2);
print_r($rts->name);
//echo '<pre>',print_r($database->fetch_array($rts)),'</pre>';
echo '<br>-------------------- Update Record ----------------------------------<br>';
$s->id = 2;
$s->name = "mohan";
$x = $s->update();
echo $x;
echo '<br>-------------------- Count Record ----------------------------------<br>';
//$rts=$s->find_all();
//echo $rtd=count($rts);
echo $x = $s->count_all();
echo '<br>-------------------- Insert Record----------------------------------<br>';
//
//$s->name="Slider".$x;
//$s->text="Some Text here";
//$s->link="adadasd";
//$s->image=$x.".jpg";
//$s->sort=$x+1;
//$s->status="Active";
//echo $x=$s->create();
echo '<br>-------------------- Count by x Record (sort=6) ----------------------------------<br>';
echo $x = $s->count_by_x('sort', 6);
echo '<br>-------------------- delete by id Record ----------------------------------<br>';
//echo $x=$s->delete(6);
$menu1=Menus::find_by_group_all(0);
foreach($menu1 as $menus)
{
echo $menus->id."<br>";
}
$database->close_connection();
?>