# \[MySQL\] Join Select

**URL:** <https://forum.kirupa.com/t/mysql-join-select/192314>\
**Category:** programming\
**Created:** [June 27, 2006, 6:48pm UTC](https://forum.kirupa.com/t/mysql-join-select/192314 "2006-06-27T18:48:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [June 27, 2006, 6:48pm UTC](https://forum.kirupa.com/t/mysql-join-select/192314/1 "2006-06-27T18:48:37Z")

</div>

```php

$sql = "SELECT * FROM blog, responses WHERE blog.ID=$threadID or responses.thread=$threadID ORDER BY time asc";
$rs = mysql_query($sql, $conn) or die ("Could not execute query 1. <a href=\"$link\">Try again</a>.");

```

Is this syntax for join selecting correct? The blog table contains all the thread starting posts and the responses table contains all the following posts. I keep on getting the error message “could not execute query 1.” Could this be caused by the fact that I have no entries in the responses table yet?
