PDA

View Full Version : Invalid SQL syntax in style.php



pwalter
03-19-2004, 11:32 PM
OpenRealty 1.1.4

In the file style.php, there is the following code:
function renderUserInfoOnListingsPage($listingID)
...

if ($listing_user_ID != "")
{
$sql = "SELECT " . $config[table_prefix] . "UserDBElements.field_value, " . $config[table_prefix] . "agentFormElements.field_type, " . $config[table_prefix] . "agentFormElements.field_caption FROM " . $config[table_prefix] . "agentDBElements, " . $config[table_prefix] . "agentFormElements WHERE ((" . $config[table_prefix] . "UserDBElements.user_id = $listing_user_ID) AND (" . $config[table_prefix] . "UserDBElements.field_name = " . $config[table_prefix] . "agentFormElements.field_name)) ORDER BY " . $config[table_prefix] . "agentFormElements.rank ASC";

...

However, in the FROM clause, table $config[table_prefix]."agentDBElements does not exist.

Is this a bug? What should the correct table name be?

Thanks
Peter

scd67
03-19-2004, 11:50 PM
already got that one: http://www.open-realty.org/phpBB2/viewtopic.php?t=2432. I believe that 1.15 has the fix in place, or you can just edit the code like I did (towards the bottom of page).