On Wednesday 10 March 2004 15:11, AJ Seelund wrote:

> 11 //create a table
> 12 $sql = 'CREATE TABLE $newTable ( `daUser` VARCHAR( 255 ) NOT NULL ,'
> 13        . ' `entryNumb` INT NOT NULL ,'
> 14        . ' `priv` VARCHAR( 1 ) NOT NULL ,'
> 15        . ' `comm` BLOB NOT NULL ,'
> 16        . ' PRIMARY KEY ( `entryNumb` ) )';
> 17
> 18
> 19 $resulter = mysql_query($sql) or die("There has been an error
> creating table: $newTable");

> on line 12 is where ive narrowed the error to.  i know that the table
> name is what is supposed to be there but im trying to create this based
> on a post entry number and then adding "_comms" to the name..

Right so echo($sql) to find your error.

> so the comments table for post number 1 would be named: 1_comms
> im also having an issue with line 3, creating that name

Use the concatenation operator, which is a period (.), a + is the mathematical 
addition operator.

Also, always use mysql_error().

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Every journalist has a novel in him, which is an excellent place for it.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to