Back to the month index |
Back to the list index
|
Christopher Pelham (cpelham@macconnect.com)
Sat, 05 Apr 1997 18:18:49 -0500
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Clyde Smith-Stubbs: "Re: Fw: [mSQL] Locking?"
- Previous message: Doug Salot: "Re: Fw: [mSQL] Locking?"
- In reply to: Clyde Smith-Stubbs: "Re: Fw: [mSQL] Locking?"
- Next in thread: Jonathan Roy: "Re: [mSQL] & phtml insert syntax problems"
- Reply: Jonathan Roy: "Re: [mSQL] & phtml insert syntax problems"
Date: Sat, 05 Apr 1997 18:18:49 -0500 From: Christopher Pelham <cpelham@macconnect.com> Subject: Re: [mSQL] & phtml insert syntax problems Message-Id: <l03020700af6c8c961532@[206.80.182.96]>I am trying to start up an mSQL database. It is installed on my ISP. I
have sucessfully created a table. However, I am having still
trouble with syntax using PHP/F1 to add data to my table. Thanks to all
who have given me advice so far. I have implemented all suggestions
(making my $result line fit all on one line, removing single quotes around
integrs) but still am having no luck.
I use an html form to input data for a new table row and then post it to a
.phtml page which is supposed to then send the data to the mSQL table
but no matter what I get a parse error on my
$result = msql($database , "insert into ...") command which quotes the
latter part of the line and flashed the semicolon at the end of it off and
on.
Below is the full .phtml file in question and below that is the file I used
to create
my table. If anyone could help me out, I would deeply appreciate it.
If anyone could send me an example of how this command has been
successfully implememnted, that might also help me out. Thanks again, Chris.
-------------------
<?
$database = "atlhf";
$ML = strval($ML);
$listing_price = strval($listing_price);
$house_age = strval($house_age);
$stories = strval($stories);
$rooms = strval($rooms);
$level_up_bdrms = strval($level_up_bdrms);
$level_up_fbath = strval($level_up_fbath);
$level_up_hbath = strval($level_up_hbath);
$level_main_bdrms = strval($level_main_bdrms);
$level_main_fbath = strval($level_main_fbath);
$level_main_hbath = strval($level_main_hbath);
$level_lower_bdrms = strval($level_lower_bdrms);
$level_lower_fbath = strval($level_lower_fbath);
$level_lower_hbath = strval($level_lower_hbath);
$fireplaces = strval($fireplaces);
settype($ML, "integer");
settype($listing_price, "integer");
settype($house_age, "integer");
settype($stories, "integer");
settype($rooms, "integer");
settype($level_up_bdrms, "integer");
settype($level_up_fbath, "integer");
settype($level_up_hbath, "integer");
settype($level_main_bdrms, "integer");
settype($level_main_fbath, "integer");
settype($level_main_hbath, "integer");
settype($level_lower_bdrms, "integer");
settype($level_lower_fbath, "integer");
settype($level_lower_hbath, "integer");
settype($fireplaces, "integer");
$result = msql("atlhf", "insert into table_houses (ML, listing_company,
agent_name, agent_phone, ownername_last, ownername_first, address, city,
state, county, zip, subdivision, listing_price, assumable_mortgage,
house_age, school_elementary, school_middle, school_high, house_style,
stories, construction, dining, parking, rooms, basement, lot_size,
lot_description, neighborhood, exterior, interior, level_up_bdrms,
level_up_fbath, level_up_hbath, level_main_bdrms, level_main_fbath,
level_main_hbath, level_lower_bdrms, level_lower_fbath, level_lower_hbath,
heat_fuel, cooling, fireplaces, pool, tennis, directions, remarks) values
($ML, '$listing_company', '$agent_name', '$agent_phone', '$ownername_last',
'$ownername_first', '$address', '$city', '$state', '$county', '$zip',
'$subdivision', $listing_price, '$assumable_mortgage', $house_age,
'$school_elementary', '$school_middle', '$school_high', '$house_style',
$stories, '$construction', '$dining', '$parking', $rooms, '$basement',
'$lot_size', '$lot_description', '$neighborhood', '$exterior', '$interior',
$level_up_bdrms, $level_up_fbath, $level_up_hbath, $level_main_bdrms,
$level_main_fbath, $level_main_hbath, $level_lower_bdrms,
$level_lower_fbath, $level_lower_hbath, '$heat_fuel', '$cooling',
$fireplaces, '$pool', '$tennis', '$directions', '$remarks')";
>
-----------------
>create table table_houses (
> ML int,
> listing_company char(25) not null,
> agent_name char(25) not null,
> agent_phone char(10) not null,
> ownername_last char(20) not null,
> ownername_first char(15) not null,
> address char(30) not null,
> city char(20) not null,
> state char(2) not null,
> county char(20) not null,
> zip int,
> subdivision char(25) not null,
> listing_price int,
> assumable_mortgage char(1) not null,
> house_age int,
> school_elementary char(20) not null,
> school_middle char(20) not null,
> school_high char(20) not null,
> house_style char(50) not null,
> stories int,
> construction char(50) not null,
> dining char(30) not null,
> parking char(30) not null,
> rooms int,
> basement char(30) not null,
> lot_size char(30) not null,
> lot_description char(50) not null,
> neighborhood char(30) not null,
> exterior char(30) not null,
> interior char(30) not null,
> level_up_bdrms int,
> level_up_fbath int,
> level_up_hbath int,
> level_main_bdrms int,
> level_main_fbath int,
> level_main_hbath int,
> level_lower_bdrms int,
> level_lower_fbath int,
> level_lower_hbath int,
> heat_fuel char(20) not null,
> cooling char(20) not null,
> fireplaces int,
> pool char(1) not null,
> tennis char(1) not null,
> directions char(50) not null,
> remarks char(80) not null
>)
>\g
>
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Clyde Smith-Stubbs: "Re: Fw: [mSQL] Locking?"
- Previous message: Doug Salot: "Re: Fw: [mSQL] Locking?"
- In reply to: Clyde Smith-Stubbs: "Re: Fw: [mSQL] Locking?"
- Next in thread: Jonathan Roy: "Re: [mSQL] & phtml insert syntax problems"
- Reply: Jonathan Roy: "Re: [mSQL] & phtml insert syntax problems"