Problem with Auto Dealer Script
11-29-04, 12:23 PM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
Problem with Auto Dealer Script
I got the free php script from here, it linked me to
http://car-dealer-website.org/
where i downloaded the script.. I installed it fine, but when messing around with the "demo" i guess you could call it, If I go into "models" then choose Edit or Details, I get the following Error:
SELECT * FROM `` WHERE ``=''Incorrect table name ''
This is a pretty small script, so if someone could d/l it, and show me what im doing wrong, I'd appreciate it! my script is located at
www.prayershares.com/briens/admin/index.php login: admin/test
You can see the error yourself, maybe help me out too!!
Thanks in advance
11-29-04, 03:02 PM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
nice
well i see someone decided to change my admin password... very lame... Anyways the login is now hotscript and pass is "hotscript"
Someone help me figure it out!!! PLEASE!?!
11-29-04, 04:40 PM
Junior Code Guru
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
it would be alot easyer to figure it out if you showd us the script behind the page that gives the error
11-29-04, 05:15 PM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
from/to page
This is the page im trying to come from...
http://www.prayershares.com/briens/a...x.php?sub=auto
when i click "details" on any vehicle, it sends me to this page:
http://www.prayershares.com/briens/a...tails&car_id=9
and gives me this error :
SELECT * FROM `` WHERE ``=''Incorrect table name ''
Im kinda new to PHP, so any and All help is greatly appreciated!!
Thanks,
keith
The Following User Says Thank You to nuzzle For This Useful Post:
11-29-04, 05:25 PM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
This is the code from the "details.xml" file
<form>
<title>Vehicle Details</title>
<action>index.php?sub=auto&action=store</action>
<name>edit</name>
<encoding>multipart/form-data</encoding>
<width>540</width>
<formtag>true</formtag>
<border>true</border>
<buttons>
<set>
<footer>true</footer>
<header>true</header>
</set>
<return onclick="" button="return" >
<location>index.php?sub=auto</location>
</return>
<save onclick="" button="edit">
<location>index.php?sub=auto&action=edit&car_id={C AR_ID}</location>
</save>
</buttons>
<redirect>index.php?sub=auto&action=details&car_id ={CAR_ID}</redirect>
<fields>
<car_id type="hidden"/>
<car_make type="relation">
<title>Make</title>
<relation table="make" id="make_id" text="make_name" condition="make_parent=0" order="make_name" order_mode="ASC"/>
</car_make>
<car_model type="relation">
<title>Model</title>
<relation table="make" id="make_id" text="make_name" condition="make_parent!=0" order="make_name" order_mode="ASC"/>
</car_model>
<car_description type="text">
<title>Description</title>
</car_description>
<car_tn_image type="image" editable="false" adminwidth="100" adminheight="100" path="../upload/" absolute="false" >
<file default="car_" field="car_id" ext=".jpg" />
<title>Tn Image</title>
<error>No image currently available.</error>
</car_tn_image>
<car_image type="image" editable="false" adminwidth="100" adminheight="100" path="../upload/" absolute="false" >
<file default="bcar_" field="car_id" ext=".jpg" />
<title>Image</title>
<error>No image currently available.</error>
</car_image>
<subtitle type="subtitle" title="Car Details" />
<car_year type="text">
<title>Year</title>
</car_year>
<car_price type="text" action="price" preffix="$">
<title>Price</title>
</car_price>
<car_mileage type="text">
<title>Mileage</title>
</car_mileage>
<car_track type="text">
<title>Tracking Number</title>
</car_track>
<subtitle2 type="subtitle" title="Private Fields ( apears in admin only )" />
<car_vin type="text">
<title>VIN</title>
</car_vin>
<car_dealer_price type="text" action="price" preffix="$">
<title>Dealer Price</title>
</car_dealer_price>
<car_sold_price type="text" action="price" preffix="$">
<title>Sold Price</title>
</car_sold_price>
<car_sold_to type="text">
<title>Sold To</title>
</car_sold_to>
<car_dealer_notes type="text">
<title>Dealer Notes</title>
</car_dealer_notes>
</fields>
</form>
This is the code from the "details.xml" file
The Following User Says Thank You to nuzzle For This Useful Post:
11-30-04, 03:17 AM
Junior Code Guru
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
yea.. i want to se the code for details.php.. and please put it inside [ php] [ /php] tags (without space)
11-30-04, 10:10 AM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
code for details.php
here is the code for 'details.php'
Here is something else, im not sure if you want to see or not, but when the database was setup the install help said to run this sql file against the database... so here is the sql file it ran and said "successfull" >>
The Following User Says Thank You to nuzzle For This Useful Post:
11-30-04, 10:11 AM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
**** the sql file didnt show right... here is the SQL File I hadda run... sorry : : :
PHP Code:
-- phpMyAdmin SQL Dump
-- version 2.6.0 - pl2
-- [ url ] http : //www.phpmyadmin.net[/url]
--
-- Generation Time : Oct 31 , 2004 at 11 : 05 PM
-- Server version : 4.0.18
-- PHP Version : 4.3.8
--
-- Database : ` mvander_car `
--
-- --------------------------------------------------------
--
-- Table structure for table ` site_cars `
--
CREATE TABLE ` site_cars ` (
` car_id ` int ( 11 ) NOT NULL auto_increment ,
` car_model ` int ( 11 ) NOT NULL default '0' ,
` car_make ` int ( 11 ) NOT NULL default '0' ,
` car_year ` int ( 4 ) NOT NULL default '0' ,
` car_price ` varchar ( 100 ) NOT NULL default '' ,
` car_mileage ` int ( 4 ) NOT NULL default '0' ,
` car_track ` varchar ( 100 ) NOT NULL default '' ,
` car_vin ` varchar ( 100 ) NOT NULL default '' ,
` car_dealer_price ` varchar ( 100 ) NOT NULL default '' ,
` car_sold_price ` varchar ( 100 ) NOT NULL default '' ,
` car_sold_to ` varchar ( 200 ) NOT NULL default '' ,
` car_dealer_notes ` text NOT NULL ,
` car_description ` longtext NOT NULL ,
` car_tn_image ` int ( 1 ) NOT NULL default '0' ,
` car_image ` int ( 1 ) NOT NULL default '0' ,
PRIMARY KEY (` car_id `)
) TYPE = MyISAM AUTO_INCREMENT = 8 ;
--
-- Dumping data for table ` site_cars `
--
INSERT INTO ` site_cars ` VALUES ( 7 , 21 , 16 , 2004 , '21800' , 8000 , '' , '' , '' , '' , '' , '' , 'Almost new, super quiet ride. This has all the features that you want. Rated number 1 by ABC reports.' , 1 , 1 );
INSERT INTO ` site_cars ` VALUES ( 6 , 17 , 14 , 2002 , '18900' , 25900 , '' , '' , '' , '' , '' , '' , 'Need to tow your trailer, this is the vehicle for the job. Imaculate inside and out. CD player and leather seating.' , 1 , 1 );
INSERT INTO ` site_cars ` VALUES ( 5 , 19 , 15 , 1995 , '9800' , 0 , '' , '' , '' , '' , '' , '' , 'Test' , 1 , 1 );
-- --------------------------------------------------------
--
-- Table structure for table ` site_make `
--
CREATE TABLE ` site_make ` (
` make_id ` int ( 11 ) NOT NULL auto_increment ,
` make_parent ` int ( 11 ) NOT NULL default '0' ,
` make_name ` varchar ( 200 ) NOT NULL default '' ,
PRIMARY KEY (` make_id `)
) TYPE = MyISAM AUTO_INCREMENT = 23 ;
--
-- Dumping data for table ` site_make `
--
INSERT INTO ` site_make ` VALUES ( 1 , 0 , 'Audi' );
INSERT INTO ` site_make ` VALUES ( 2 , 0 , 'BMW' );
INSERT INTO ` site_make ` VALUES ( 3 , 0 , 'Renault' );
INSERT INTO ` site_make ` VALUES ( 4 , 0 , 'General Motors' );
INSERT INTO ` site_make ` VALUES ( 5 , 0 , 'Ford' );
INSERT INTO ` site_make ` VALUES ( 6 , 3 , 'Laguna' );
INSERT INTO ` site_make ` VALUES ( 7 , 3 , 'Megane' );
INSERT INTO ` site_make ` VALUES ( 8 , 3 , 'Clio' );
INSERT INTO ` site_make ` VALUES ( 9 , 3 , 'Logan' );
INSERT INTO ` site_make ` VALUES ( 10 , 5 , 'Escort' );
INSERT INTO ` site_make ` VALUES ( 11 , 5 , 'Focus' );
INSERT INTO ` site_make ` VALUES ( 12 , 5 , 'Mondeo' );
INSERT INTO ` site_make ` VALUES ( 13 , 5 , 'Fiesta' );
INSERT INTO ` site_make ` VALUES ( 14 , 0 , 'Chevrolet' );
INSERT INTO ` site_make ` VALUES ( 15 , 0 , 'Honda' );
INSERT INTO ` site_make ` VALUES ( 16 , 0 , 'Toyota' );
INSERT INTO ` site_make ` VALUES ( 17 , 14 , 'Suburban' );
INSERT INTO ` site_make ` VALUES ( 18 , 14 , 'Malibu' );
INSERT INTO ` site_make ` VALUES ( 19 , 15 , 'Accord' );
INSERT INTO ` site_make ` VALUES ( 20 , 15 , 'Civic' );
INSERT INTO ` site_make ` VALUES ( 21 , 16 , 'Camry' );
INSERT INTO ` site_make ` VALUES ( 22 , 16 , 'Sienna' );
-- --------------------------------------------------------
--
-- Table structure for table ` site_photos `
--
CREATE TABLE ` site_photos ` (
` id ` int ( 11 ) NOT NULL auto_increment ,
` car ` int ( 11 ) NOT NULL default '0' ,
` title ` varchar ( 200 ) NOT NULL default '' ,
` description ` text NOT NULL ,
` tn ` int ( 1 ) NOT NULL default '0' ,
` image ` int ( 1 ) NOT NULL default '0' ,
PRIMARY KEY (` id `)
) TYPE = MyISAM AUTO_INCREMENT = 2 ;
--
-- Dumping data for table ` site_photos `
--
INSERT INTO ` site_photos ` VALUES ( 1 , 2 , 'Inside View' , 'Image downloaded from .net' , 1 , 1 );
-- --------------------------------------------------------
--
-- Table structure for table ` site_users `
--
CREATE TABLE ` site_users ` (
` user_id ` int ( 11 ) NOT NULL auto_increment ,
` user_name ` varchar ( 100 ) NOT NULL default '' ,
` user_login ` varchar ( 100 ) NOT NULL default '' ,
` user_password ` varchar ( 100 ) NOT NULL default '' ,
` user_level ` int ( 1 ) NOT NULL default '0' ,
PRIMARY KEY (` user_id `)
) TYPE = MyISAM AUTO_INCREMENT = 5 ;
--
-- Dumping data for table ` site_users `
--
INSERT INTO ` site_users ` VALUES ( 3 , 'Admin' , 'admin' , 'test' , 0 );
INSERT INTO ` site_users ` VALUES ( 2 , 'Jon Doe' , 'test' , 'test' , 1 );
-- --------------------------------------------------------
--
-- Table structure for table ` site_vars `
--
CREATE TABLE ` site_vars ` (
` id ` int ( 11 ) NOT NULL auto_increment ,
` name ` varchar ( 200 ) NOT NULL default '' ,
` value ` text NOT NULL ,
PRIMARY KEY (` id `)
) TYPE = MyISAM AUTO_INCREMENT = 37 ;
--
-- Dumping data for table ` site_vars `
--
INSERT INTO ` site_vars ` VALUES ( 32 , 'ipp' , '15' );
INSERT INTO ` site_vars ` VALUES ( 33 , 'mail_address' , 'test@example.com' );
INSERT INTO ` site_vars ` VALUES ( 34 , 'mail_title' , 'AUTO: Details Request' );
INSERT INTO ` site_vars ` VALUES ( 35 , 'mail_link' , '1' );
INSERT INTO ` site_vars ` VALUES ( 36 , 'task_user' , '1' );
The Following User Says Thank You to nuzzle For This Useful Post:
11-30-04, 11:09 AM
Newbie Coder
Join Date: Sep 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Update on the site.
A new updated version has been posted on that site, looks like it addresses that issue. Let us know if that does work. I'd be interested in using it too, looks like a nice program.
Auto Dealer Website
Last edited by lila; 11-30-04 at 11:13 AM .
11-30-04, 03:54 PM
Newbie Coder
Join Date: Nov 2004
Posts: 26
Thanks: 0
Thanked 4 Times in 4 Posts
Well I figured it out!! yay! Thanks for the help and notice that they updated!!
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off