What is error code 504?

Recieve this error code parse error, unexpected T_STRING in listDB.php on line 46 what is wrong?

  • Here is the code can anyone tell me what I am doing wrong $state = $_Get['state']; if(empty($state)) exit("<p> You must enter a two didgit abbreviation for the state you wish to see. Hit your browser back button to return to previous page.</p>"); // connecting to the database $connection = @mysqli_connect("localhost","user1"," password1") Or die ("<p>Unable to connect to the Telephone Directory.</p>" . "<p>Error code ".mysqli_connect_errno() .":".mysqli_connect_error()) . "</p>"; $DBName="thompsonm"; @mysqli_select_db($connection,$DBName) or die("<p> Unable to perform search please try again.</p>" ."<p>Error code" . mysqli_errno($connection) . ":". mysqli_error($connection))."<p>; // Table $TableName="contacts information"; $SQLstring = "SELECT First Name, Last Name, State, Area code, Phone number FROM $TableName WHERE State='$state' ODER BY Last Name"; $Qresults = @mysqli_query($connection,$SQLstring) or die ("<p> Unable to perform search please try again.</p>" . "<p>Error code" . mysqli_errno($connection) . ":" . mysqli_error($connection)). "</p>"; if (mysqli_num_rows($Qresults) ==0) die ("There are no listings for that state.</p>"); echo "<table width= '100%' border= '1'>"; echo "<tr><th>Last Name</th><th> First Name</th> <th> State</th><th>Area code</th><th>Phone number</th></tr>"; $Row = mysqli_fetch_assoc($Qresults); do{ echo "<tr><td>{$Row['Last Name']}</td>"; echo "<td>{$Row['First Name']}</td>"; echo "<td>{$Row['State']}</td>"; echo "<td>{$Row['Area code']}</td></tr>; $Row = mysqli_fetch_assoc($Qresult); }while ($Row);

  • Answer:

    The ORDER by clause is incorrect SELECT First Name, Last Name, State, Area code, Phone number FROM $TableName WHERE State='$state' ODER BY Last Name it should be "ORDER BY" not "ODER BY"

marcey t at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.