[BNM] PHP string parse error

Crosbie Fitch bnmlist@brightonnewmedia.org
Thu Mar 27 15:40:01 2003


> From: Jay Gooby
>
> No you're missing the closing bracket for your Col() function...

DOH!! yep, I spotted it eventually. Thanks Jay.

I guess, as a PHP newbie, and unused to this idea of merging text and code,
I'm going to be overestimating my ability to avoid typos.

>
> and rather than use all those evil string appends, use {} to
> keep your array
> variables in a quoted string:

Yep, just done that:

$sql
    =	"CREATE TABLE $account_table
    	(	{$account_column['AccountID']} int(11) NOT NULL auto_increment
        ,	{$account_column['CreationDate']} timestamp(14) default NULL
		,	PRIMARY KEY(".Col($account_column['AccountID']).")
    	)"
    ;


I bet there's a bloody PHP SQL library I should be using...


THANKS EVERYONE!!!

I'll try harder.