Jump to content

SQL or PHP?


lugos
 Share

Recommended Posts

Hello,I am going through the book Dreamweaver 8 with ASP, ColdFusion, and PHP Training from the Source, which by the way I think is an excellent book for beginners who want to learn dynamic web development using Dreamweaver. The book includes a tutorial which is almost like a case study, where each chapter builds upon the previous chapters. So I'm stuck at a point in the book where a certain SQL statement is producing an error. However, I'm not sure if it's the SQL code, the PHP code, or possibly even Dreamweaver that's causing the error. So, if it is not a problem, I will post this question in the SQL forum also.Here is the SQL code:

SELECT * FROM tbl_tours INNER JOIN tbl_countryON tbl_country.countryID=tbl_tours.countryORDER BY tbl_country.countryName

Now, the book says that the following SQL code is the same as the above:

SELECT * FROM tbl_tours, tbl_countryWHERE tbl_country.countryID=tbl_tours.countryORDER BY tbl_country.countryName

But neither of them work. The PHP code is as follows:

<?php require_once('Connections/conn_newland.php'); ?><?phpmysql_select_db($database_conn_newland, $conn_newland);$query_rs_tourDetail = "SELECT * FROM tbl_tours INNER JOIN tbl_country ON tbl_country.countryID=tbl_tours.country ORDER BY tbl_country.countryName";$rs_tourDetail = mysql_query($query_rs_tourDetail, $conn_newland) or die(mysql_error());$row_rs_tourDetail = mysql_fetch_assoc($rs_tourDetail);$totalRows_rs_tourDetail = mysql_num_rows($rs_tourDetail);?>

This PHP code is generated by Dreamweaver. I am very new to the PHP programming language.Any help would be greatly appreciated.Thanks,lugos

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...