0

hello,

i wanna know whats the best way to show query results from mysql onto a webpage..

some says this can only be done in form of table..
but nowadays table less design is preferred..tell me teh most demanding way if somebody knows..

2
Contributors
6
Replies
33
Views
3 Years
Discussion Span
Last Post by ankit1122
0

some says this can only be done in form of table.

It's all up to you, how it would best fit into your design. There is no one guaranteed best way to do this.

0

sir i have made design free so page load faster..tell me should i make it table less or with table and share code

0

should i make it table less or with table

That would be your decision. Either is just fine.

share code

Share code for what? Did you look at the code snippets in this forum?

0

i want to show results from mysql to a rtable on a web page..
how can i do this??

0

i have made thus code but it is not working

if($_POST["results"])
        {

             $db=$_POST["db"];

$skills = explode(",", $_POST["skills"]);
$table = explode(",", $_POST["table"]);
$city = explode(",", $_POST["city"]);
$region = explode(",", $_POST["region"]);
$country = explode(",", $_POST["country"]);

$latitude=$_POST["lat"];
$longitude=$_POST["long"];

$distance=$_POST["dist"];

$latitude*=0.01745;
$longitude*=0.01745;



$s="select sno from $table[0] where skills regexp \"$skills[0]\"";


for($i=1;$i<count($skills);$i++)
{
    $s.=" and skills regexp \"$skills[$i]\"";

    }
    $s.=" and deposit>=bid";

    for($i=0;$i<count($region);$i++)
if(!$region[$i]=="")
    {
    $s.=" and region regexp \"$region[$i]\"";

    }

    for($i=0;$i<count($city);$i++)
if(!$city[$i]=="")
    {
    $s.=" and city regexp \"$city[$i]\"";

    }


    for($i=0;$i<count($country);$i++)
if(!$country[$i]=="")
    {
    $s.=" and country regexp \"$country[$i]\"";

    }
    if(!$latitude=="")
    {

   $s.=" and acos(sin($latitude) * sin(Lati) + cos($latitude) * cos(Lati) * cos(Longi - ($longitude))) * 6371 <= $distance";
    }



    $con=mysqli_connect("localhost","root","cutiepie_100",$db);
    if (mysqli_connect_errno()) 
        {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
//print_r($s);
$abc=mysqli_query($con, $s) or die('cannot show tables');
//print_r($s);
while ($row = mysql_fetch_array($abc))
{
   // print_r($s);
echo "<tr><td>{$row['sno']}</td></tr>"; 

}   
        }   
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.