Parse error: syntax error, unexpected '-', expecting ',' or ';'

5 views
Skip to first unread message

mtb24

unread,
Oct 31, 2009, 3:23:43 PM10/31/09
to Php Object Generator
I just generated some objects, edited (and renamed) config file, and
when I run setup, click the "Pog Me Up" button - I get an error about
a dash in my table column names.
Can't find this error in previous posts....

The error:
Parse error: syntax error, unexpected '-', expecting ',' or ';' in /
home/indoorcy/public_html/testing/pog/objects/
class.commissionjunction.php on line 43


This part of the generated code is referenced by the error:
class CommissionJunction extends POG_Base
{
public $commissionjunctionId = '';

/**
* @var VARCHAR(255)
*/
public $ad-id;

/**
* @var VARCHAR(255)
*/
public $advertiser-id;

/**
* @var VARCHAR(255)
*/
public $advertiser-name;

/**
* @var VARCHAR(255)
*/
public $buy-url;

/**
* @var VARCHAR(255)
*/
public $catalog-id;

/**
* @var VARCHAR(255)
*/
public $currency;


The @link:

http://www.phpobjectgenerator.com/?language=php5.1&wrapper=pdo&pdoDriver=mysql&objectName=CommissionJunction&attributeList=array+%28%0A++0+%3D%3E+%27ad-id%27%2C%0A++1+%3D%3E+%27advertiser-id%27%2C%0A++2+%3D%3E+%27advertiser-name%27%2C%0A++3+%3D%3E+%27buy-url%27%2C%0A++4+%3D%3E+%27catalog-id%27%2C%0A++5+%3D%3E+%27currency%27%2C%0A++6+%3D%3E+%27description%27%2C%0A++7+%3D%3E+%27image-url%27%2C%0A++8+%3D%3E+%27in-stock%27%2C%0A++9+%3D%3E+%27isbn%27%2C%0A++10+%3D%3E+%27manufacturer-name%27%2C%0A++11+%3D%3E+%27manufacturer-sku%27%2C%0A++12+%3D%3E+%27name%27%2C%0A++13+%3D%3E+%27price%27%2C%0A++14+%3D%3E+%27retail-price%27%2C%0A++15+%3D%3E+%27sale-price%27%2C%0A++16+%3D%3E+%27sku%27%2C%0A++17+%3D%3E+%27upc%27%2C%0A%29&typeList=array%2B%2528%250A%2B%2B0%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B1%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B2%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B3%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B4%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B5%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B6%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B7%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B8%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B9%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B10%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B11%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B12%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B13%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B14%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B15%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B16%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2B%2B17%2B%253D%253E%2B%2527VARCHAR%2528255%2529%2527%252C%250A%2529

Mario

unread,
Nov 1, 2009, 11:55:53 AM11/1/09
to php-object...@googlegroups.com

hi!

you cannot use the minus character inside a name of a field, asit is an operator (like + or *). You can't ignore this when you define the fields name.

have a nice day.

Reply all
Reply to author
Forward
0 new messages