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
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 = $
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
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
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
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
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
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
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
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
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
"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
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...
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,
, 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
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
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
> 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
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
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
>
>
&
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
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
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),
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_
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
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
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
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
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
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
> 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", "
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
32 matches
Mail list logo