01.
$objConnect
= mysql_connect(
"localhost"
,
"root"
,
""
)
or
die
(mysql_error());
02.
$objDB
= mysql_select_db(
"mydatabase"
);
03.
$strSQL
=
"SELECT * FROM customer WHERE 1 "
;
04.
$objQuery
= mysql_query(
$strSQL
)
or
die
(mysql_error());
05.
$resultArray
=
array
();
06.
while
(
$obResult
= mysql_fetch_array(
$objQuery
))
07.
{
08.
array_push
(
$resultArray
,
$obResult
);
09.
}
10.
11.
foreach
(
$data
as
$resultArray
) {
12.
echo
$data
[
"Col1"
];
13.
echo
$data
[
"Col3"
];
14.
echo
$data
[
"Col2"
];
15.
}