mysql - PHP not displaying data -


any ideas why simple php code won't display results when trying echo data.

<?php         {             mysql_connect("localhost" , "" , "") or die (mysql_error());             mysql_select_db("") or die(mysql_error());               $pid=intval($_session["user_id"]);              $query = "select `car`, `details`, `price` `car``";              //executes query on database             $result = mysql_query ($query) or die ("didn't query");              //this selects results rows             $num = mysql_num_rows ($result);                   while($row=mysql_fetch_assoc($result))             {                  $_session['car'] = $row['car'];                 $_session['details'] = $row['details'];                 $_session['price'] = $row['price'];             }         }         ?>            <?php echo $_session['car']; ?>         <?php echo $_session['details']; ?>         <?php echo $_session['price']; ?> 

just testing @ moment see if car, price , details display database , don't seem to.

i rather remove backticks since non of identifiers reserved keywords.

$query = "select car, details, price car"; 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -