RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
any php/mysql geniuses please read this
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat May 24, 2003 7:36 am    Post subject: any php/mysql geniuses please read this [quote]

First, I'm sorry, but noone else would give me any help.. I only got autoresponse emails, or ignored on the support forums..

Code:

$query = "CREATE TABLE ccps_news (
                                   ccps_newsid integer IDENTITY(0,1) not null,
                                   ccps_newsdata text not null,
                                   ccps_newsdate text not null,
                                   ccps_un text not null
                                 )";
$result = mysql_query($query) or die("Query <BR> $query <BR> failed");
print "<p>newslist created.";

this query failed.
I can't figure out why.

I've got no other problems other than this one.. for now :p

Please help if you know how.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Sat May 24, 2003 7:51 am    Post subject: [quote]

Make sure you've connected to mysql and selected a database first.
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1626
Location: Decatur, IL, USA

PostPosted: Sat May 24, 2003 7:57 am    Post subject: [quote]

Ninkazu wrote:
Make sure you've connected to mysql and selected a database first.

I did.

get on AIm......
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
akOOma
Wandering Minstrel


Joined: 20 Jun 2002
Posts: 113
Location: Germany

PostPosted: Sat May 24, 2003 11:01 am    Post subject: [quote]

Post the whole source code...or come on MSN...
_________________
Keep on codin'
-----------------

-----------------
Just another post to increase my rank...
Back to top  
Tenshi
Everyone's Peachy Lil' Bitch


Joined: 31 May 2002
Posts: 386
Location: Newport News

PostPosted: Sat May 24, 2003 6:23 pm    Post subject: [quote]

- It might be that IDENTITY property, either that or the fact that you didn't specify the length for the integer... and why don't you use PhpMyAdmin to construct your tables anyway? It creates more efficient tables.

- Let's give this a try. Sorry, I prefer to use caps for stuff..

Code:

$query = "CREATE TABLE ccps_news (
                                   ccps_newsid integer(14) NOT NULL,
                                   ccps_newsdata text NOT NULL,
                                   ccps_newsdate text NOT NULL,
                                   ccps_un text NOT NULL,
                                   PRIMARY KEY (ccps_newsid)
                                 )";
$result = mysql_query($query) or die("Query <BR> $query <BR> failed");
print "<p>newslist created.";

_________________
- Jaeda
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Sat May 24, 2003 9:58 pm    Post subject: [quote]

Only I have access to the phpMyAdmin of this server, and I would prefer if people didn't go install it themselves because it's near 5 MB per install. I can click "optimize table" on request though, but generally efficiency is no big deal as we're dealing with very small datasets here.
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum