Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
while($result = mysql_fetch_array($query)){
            echo "<p>Departure:".$result[0]."</p>";
            echo "<p>Arive:".$result[1]."</p>";
            echo "<p>Date:" .$result[2]."</p>";
            echo "<p>Time:".$result[3]."</p>";

        }
Posted
Comments
Nelek 31-Aug-14 8:50am    
?????????

Don't think we can read minds or do astral projections to see your monitor. If you need help, the least you could do is to add some relevant code to your question or to explain your problem in such a way, that the users of CP can understand it. Otherwise, nobody will be able to help you.

Please use the "improve question" and add relevant information or a piece of code envolved. There are thousands of ways to screw things up, how are we supposed to know which one did you choose?

Have a look to:
What have you tried?[^]
How to ask a question?[^]
Mohibur Rashid 31-Aug-14 9:46am    
did you follow proper steps?
example:
$query="SELECT * FROM sometable";
$result=mysql_query($query, $conn);
$row=mysql_fetch_row($result);

It means that query failed or returning an error.

check the query properly, echo that query variable and run it in mysql and check the mysql error.
 
Share this answer
 
Try this code maybe it helps
PHP
<?php
$con = mysql_connect("yourhostname","youruserid","password");
mysql_select_db("world");
$result = mysql_query("SELECT * FROM Country",$con) or die(mysql_error());
echo mysql_num_rows($result);
while($row = mysql_fetch_array($result)) {
  echo $row['Code'] . "---" . $row['Name'];
  echo "<br>";
} 
?>
</br>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900