Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM SQL Tables

date posted 11th September 2002 18:28

varchar(5000) for your properties info column definition exceeds the max
value of 255. Use a text or blob type instead.

Rich
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of Darren - Javelin
Designs
Sent: 11 September 2002 17:52
To: [EMAIL REMOVED]
Subject: RE: FN-FORUM SQL Tables


Some one suggested the below code, but that still only creates the user
table and not the properties table. Does anyone know what to do so I can
get this working.

-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] On Behalf Of Rich Bradshaw
Sent: 11 September 2002 01:51
To: [EMAIL REMOVED]
Subject: Re: FN-FORUM SQL Tables

Try this...

include("vars.php");

//Create the MySQL Database.
$result = mysql_create_db ("$db_name");
if ($result == false)
echo mysql_errno() . ": " . mysql_error() . "";

//Connect To The New Database
$connection = mysql_connect ("localhost", "darren", "pass");
if ($connection == false)
{
echo mysql_errno().": ".mysql_error()."";
exit;
}

// Select the DB
$result = mysql_select_db("$db_name");


//Create The User Table
$query = "create table users " ."(id INT NOT NULL AUTO_INCREMENT,
username
varchar(50), password varchar(50), name varchar(50), email varchar(50),
type
varchar(10), PRIMARY KEY (id))";

// Execute the query
mysql_query("$query");

// Check the result
if ($result)
echo "The users table was successfully created!";
else
echo mysql_errno().": ".mysql_error()."";


//Create The Properties Table
$query = "create table properties " ."(id INT NOT NULL AUTO_INCREMENT,
thumbnail varchar(50), location varchar(50), price varchar(10), address
varchar(100), img1 varchar(50), img2 varchar(50), img3 varchar(50), img4
varchar(50), info varchar(5000), PRIMARY KEY (id))";

// Execute the query
mysql_query("$query");

// Check the result
if ($result)
echo "The properties table was successfully created!";
else
echo mysql_errno().": ".mysql_error()."";

// Disconnect from the DB
mysql_close ();


Cheers,
Rich
----- Original Message -----
From: Darren - Javelin Designs
To: [EMAIL REMOVED]
Sent: Tuesday, September 10, 2002 10:52 PM
Subject: FN-FORUM SQL Tables


Hi if you have a look at this script, below the first $query I have
another
but as a comment. What I would like to know is how can I add that
comment
to the php script so it also creates that table, as I have tried all I
can.


============================================================
= Advanced web hosting solutions from Saffas. =
= Unix, PHP, mySQL, SSL, Perl, Control Panel, 24/7 access. =
= Why pay more for less? http://www.saffas.com =
============================================================

Sponsor the forum for as little as £1 at:

http://www.freelancers.net/cgi/sponsor.cgi?action=show


Advertise with Freelancers.net +Additions+

http://www.freelancers.net/advert.php


Freelancers and Freelance Jobs:
http://www.freelancers.net

Forum FAQs:
http://freelancers.netrickery.com

To unsubscribe please email:
[EMAIL REMOVED]

If you have difficulties unsubscribing please email:
[EMAIL REMOVED]


============================================================
= Advanced web hosting solutions from Saffas. =
= Unix, PHP, mySQL, SSL, Perl, Control Panel, 24/7 access. =
= Why pay more for less? http://www.saffas.com =
============================================================

Sponsor the forum for as little as £1 at:

http://www.freelancers.net/cgi/sponsor.cgi?action=show


Advertise with Freelancers.net +Additions+

http://www.freelancers.net/advert.php


Freelancers and Freelance Jobs:
http://www.freelancers.net

Forum FAQs:
http://freelancers.netrickery.com

To unsubscribe please email:
[EMAIL REMOVED]

If you have difficulties unsubscribing please email:
[EMAIL REMOVED]



Messages by Day
September 30th 2002
September 29th 2002
September 28th 2002
September 27th 2002
September 26th 2002
September 25th 2002
September 24th 2002
September 23rd 2002
September 22nd 2002
September 21st 2002
September 20th 2002
September 19th 2002
September 18th 2002
September 17th 2002
September 16th 2002
September 15th 2002
September 14th 2002
September 13th 2002
September 12th 2002
September 11th 2002
September 10th 2002
September 9th 2002
September 8th 2002
September 7th 2002
September 6th 2002
September 5th 2002
September 4th 2002
September 3rd 2002
September 2nd 2002
September 1st 2002


Messages by Month
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000