Re: [PHP-DB] CREATE TABLE $phpVariable_for_tableName <--- help please!

2004-03-09 Thread Jason Wong
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. ' PR

[PHP-DB] CREATE TABLE $phpVariable_for_tableName <--- help please!

2004-03-09 Thread AJ Seelund
i cant get this to work right, im building a comments for my blog. im pretty knowledgeable about php code and i am willing to listen, even though im still learning. my code in the php doc is as follows: 1 //select the db 2 $db = mysql_select_db($mydb) or die("db connect error"); 3 $newTable = $

RE: [PHP-DB] CREATE TABLE problem

2004-01-23 Thread Diane Gonzales
If you're using MySQL, change to this: staffid int(3) unsigned not null auto_increment, The order of the attribute description is important in MySQL. -Original Message- From: js [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 6:34 AM To: [EMAIL PROTECTED] Subject: [P

RE: [PHP-DB] CREATE TABLE problem

2004-01-23 Thread Diane Gonzales
Actually, it's more of an order problem: I fixed the SQL already. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 4:47 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] CREATE TABLE problem I have had si

Re: [PHP-DB] CREATE TABLE problem

2004-01-22 Thread -{ Rene Brehmer }-
hmm ... I have unsigned auto_increment fields in all my tables that use unique field IDs... But i use very long counter fields as it's pretty big tables I have (or gonna be once I get them finished)... FWIW Rene Fate would have it, that on Thu, 22 Jan 2004 08:47:01 -, [EMAIL PROTECTED] wrot

RE: [PHP-DB] CREATE TABLE problem

2004-01-22 Thread dpgirago
Regarding... -- $query = "CREATE TABLE staff ( -- staffid INT(3) NOT NULL AUTO_INCREMENT UNSIGNED, -- name VARCHAR(255) NOT NULL, -- login VARCHAR(10) NOT NULL, -- password VARCHAR(8) NOT NULL, -- picaddy VARCHAR(255) NOT NULL, -- email VARCHAR(255) NOT NULL, -- staffbio TEXT NOT NULL, -- created

RE: [PHP-DB] CREATE TABLE problem

2004-01-22 Thread N . A . Morgan
4 22:34 To: [EMAIL PROTECTED] Subject: [PHP-DB] CREATE TABLE problem ok im making this page and every single time i try to execute it, it tells me it was not successful. the database name, user,pw,and local host are all correct. i have no idea what do do, and i have 2 more tables besides this one i

Re: [PHP-DB] CREATE TABLE problem redefined

2004-01-21 Thread John W. Holmes
js wrote: You have an error in your SQL syntax near 'UNSIGNED, name VARCHAR(255) NOT NULL, login VARCHAR(10) NOT NULL, password' at line 2 Print (echo) out your entire query. You have a syntax error before the point the error message mentions. -- ---John Holmes... Amazon Wishlist: www.amazon.c

[PHP-DB] CREATE TABLE problem redefined

2004-01-21 Thread js
ok i did the mysql_error DIE thing, and now it tells me this: You have an error in your SQL syntax near 'UNSIGNED, name VARCHAR(255) NOT NULL, login VARCHAR(10) NOT NULL, password' at line 2 i have no idea what it means. i dont think any of those are taken or reserved by PHP or mySQL. any furt

Re: [PHP-DB] CREATE TABLE problem

2004-01-21 Thread Micah Stevens
mysql_db_query ($dbname,$query,$link) or die(myself_error()); will help you more than your if/then statement.. change that, and check out the error message. On Wed January 21 2004 2:33 pm, js wrote: > ok im making this page and every single time i try to execute it, it tells > me it was not su

[PHP-DB] CREATE TABLE problem

2004-01-21 Thread js
ok im making this page and every single time i try to execute it, it tells me it was not successful. the database name, user,pw,and local host are all correct. i have no idea what do do, and i have 2 more tables besides this one i wanted to create but this was kind of my template for it and i ca

Re: [PHP-DB] CREATE TABLE LIKE, error

2003-12-15 Thread Adam i Agnieszka Gasiorowski FNORD
"CPT John W. Holmes" wrote: > From: "Adam i Agnieszka Gasiorowski FNORD" <[EMAIL PROTECTED]> > > > I cannot use this query > > > > CREATE TABLE table LIKE other_table; > > > > , which is supposed to create an > > empty "clone" of the other_table named > > table. > > Was it added in some later

Re: [PHP-DB] CREATE TABLE LIKE, error

2003-12-15 Thread CPT John W. Holmes
From: "Gary Every" <[EMAIL PROTECTED]> > Try: > CREATE table new_table SELECT * from old_table limit 1; > > delete from new_table; > > This will give you the same structure in both tables, and the > deletion will make the new_table empty. Not quite the same as it will not copy indexes/keys...

Re: [PHP-DB] CREATE TABLE LIKE, error

2003-12-15 Thread CPT John W. Holmes
From: "Adam i Agnieszka Gasiorowski FNORD" <[EMAIL PROTECTED]> > I cannot use this query > > CREATE TABLE table LIKE other_table; > > , which is supposed to create an > empty "clone" of the other_table named > table. > Was it added in some later MySQL version? > It's in the manual on mysql.com,

RE: [PHP-DB] CREATE TABLE LIKE, error

2003-12-15 Thread Gary Every
, December 15, 2003 10:28 AM To: Lista PHP DB Subject: [PHP-DB] CREATE TABLE LIKE, error I cannot use this query CREATE TABLE table LIKE other_table; , which is supposed to create an empty "clone" of the other_table named table. Was it added in some l

[PHP-DB] CREATE TABLE LIKE, error

2003-12-15 Thread Adam i Agnieszka Gasiorowski FNORD
I cannot use this query CREATE TABLE table LIKE other_table; , which is supposed to create an empty "clone" of the other_table named table. Was it added in some later MySQL version? It's in the manual on mysql.com, bo no version info available. -- Seks, seks

[PHP-DB] Create table

2003-09-02 Thread Larry Sandwick
I am trying to use PHP to create a table ( 5 wide by X long ) , with pictures in a directory, and have not been able to find this information. There are about 33 picture in a specific directory, and I would like to just read them in and create a table when the link is click. Can someone p

RE: [PHP-DB] Create table example

2003-03-30 Thread John W. Holmes
> I have several (50+) tables I have to create in MySql. Is there a good PHP > example on creating a table via PHP?? I will probably do all of the > initial INSERTS that way, too. You don't create a table "via PHP", you simply pass a query through the mysql_query() function. If that query is a CRE

[PHP-DB] Create table example

2003-03-30 Thread Sparky Kopetzky
Good afternoon!! I have several (50+) tables I have to create in MySql. Is there a good PHP example on creating a table via PHP?? I will probably do all of the initial INSERTS that way, too. Thanks!! Robin Kopetzky Black Mesa Computer/Internet Services www.blackmesa-isp.net

Re: [PHP-DB] CREATE TABLE QUERY PHP/MySQL

2002-12-07 Thread Ignatius Reilly
answers inline Ignatius - Original Message - From: "Jonathan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 06, 2002 10:39 PM Subject: RE: [PHP-DB] CREATE TABLE QUERY PHP/MySQL > > &

RE: [PHP-DB] CREATE TABLE QUERY PHP/MySQL

2002-12-06 Thread Jonathan
Friday, December 06, 2002 3:34 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] CREATE TABLE QUERY PHP/MySQL Very likely you have to GRANT the CREATE permission to your PHP user account. Also investigate the CREATE TEMPORARY TABLE grant status available since version 4+. Very c

Re: [PHP-DB] CREATE TABLE QUERY PHP/MySQL

2002-12-06 Thread Ignatius Reilly
t; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 06, 2002 10:00 PM Subject: [PHP-DB] CREATE TABLE QUERY PHP/MySQL > This is the first time I am trying to create a table in MySQL based on > user input. > > Here is the scenario, > > The user will enter in t

Re: [PHP-DB] CREATE TABLE QUERY PHP/MySQL

2002-12-06 Thread Jason Wong
On Saturday 07 December 2002 05:00, Jonathan wrote: > This is the first time I am trying to create a table in MySQL based on > user input. > > Here is the scenario, > > The user will enter in the name of a stage, e.g. Harley Davidson. > I then look for the first space (to indicate the first word),

[PHP-DB] CREATE TABLE QUERY PHP/MySQL

2002-12-06 Thread Jonathan
This is the first time I am trying to create a table in MySQL based on user input. Here is the scenario, The user will enter in the name of a stage, e.g. Harley Davidson. I then look for the first space (to indicate the first word), make it into lower case and then do the following: $new_stage_

Re: [PHP-DB] Create Table with AutoIncrement-field in M$ AccessDB

2002-10-22 Thread Ignatius Reilly
What is your problem exactly? Ignatius - Original Message - From: "Jaap Aikema" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 22, 2002 11:58 AM Subject: [PHP-DB] Create Table with AutoIncrement-fiel

[PHP-DB] Create Table with AutoIncrement-field in M$ AccessDB

2002-10-22 Thread Jaap Aikema
I try to make a new table using PHP4 & M$ Access (via ADODB). This is the code I use: //begin DB-connection to create table $db_connection = new COM("ADODB.Connection"); $db_connstr = "driver={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("database.mdb") ." ;DefaultDir=". realpath(""); $db_co

RE: [PHP-DB] Create Table from a file in php

2002-01-12 Thread Miles Thompson
here. > >5 Books, 20+ websites and no closer:-( > >Can you throw some nugets of wisdom this way. Please. > >Thanks for the help and i hope the included code sample can help someone >else. > >Thanks > >Dave C > >-----Original Message- >From: Miles Thomp

Re: [PHP-DB] Create Table from a file in php

2002-01-11 Thread Miles Thompson
I don't know how you would do it from a file off the top of my head, so let's invent it, in pseudocode, anyway. The important thing to remember is that all of the commands to create or alter tables / databases are SQL queries. So the mysql_query() function is used to do most of the work. Assum

[PHP-DB] Create Table from a file in php

2002-01-11 Thread Dave Carrera
Hi All I want to create a table from a file that contains the sql to create the table. I have checked Mysql.com and have seen how to do it from telnet, but i want to do it from a php script. Can anyone please help. Thanks in Advance Dave C The two rules for success are: 1. Never tell them ev

Re: [PHP-DB] create table with php -whats wrong?

2001-10-28 Thread Richard S. Crawford
Place your query in a string variable, like $sSql, and use the mysql_query command to execute the query. For example: $sSql="CREATE TABLE test (id TINYINT not null AUTO_INCREMENT, process LONGTEXT not null , title LONGTEXT not null , description LONGTEXT not null , PRIMARY KEY (id))"; if (!m

Re: [PHP-DB] create table with php -whats wrong?

2001-10-28 Thread DL Neil
> Hello all. > > I am trying to create simple test table with php, but I get: > > Parse error: parse error in /home/vanesaw/public_html/create.php on line 5 > > Line 5 is command to create table (see code below). > > Whats wrong with it? Thanks. > > $sql = mysql_connect("host", "

[PHP-DB] create table with php -whats wrong?

2001-10-28 Thread Saulius Jankauskas
Hello all. I am trying to create simple test table with php, but I get: Parse error: parse error in /home/vanesaw/public_html/create.php on line 5 Line 5 is command to create table (see code below). Whats wrong with it? Thanks. done -- PHP Database Mailing List (http://www.p