•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 402,510 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,719 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 600 | Replies: 4
![]() |
•
•
Join Date: Feb 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Well n not a mysql expert so i need help with this sql file here r d contents of it.
Quote:
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '";
"insert into admin set username='$admin_login',password='$admin_pass',web m' at line 8
__________________
Quote:
CREATE TABLE `admin` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255),
`password` varchar(255),
`webmaster_email` varchar(255),
`lastlogin` int(11),
PRIMARY KEY (`id`)
)";
"insert into admin set username='$admin_login',password='$admin_pass',web master_email='$admin_email'";
CREATE TABLE `admin_session` (
`admin_id` int(11) NOT NULL auto_increment,
`hash` varchar(255),
`timestamp` int(11),
`last_export` int(11),
PRIMARY KEY (`admin_id`)
)";
CREATE TABLE `admin_settings` (
`id` int(11) NOT NULL DEFAULT '0' ,
`help_url` varchar(255) ,
`email_from_name` varchar(255) ,
`email_subject` varchar(255) ,
`email_message` text ,
`paypal_email` varchar(255) ,
`stormpay_email` varchar(255) ,
`mailer_details` text ,
PRIMARY KEY (`id`)
)";
"insert into admin_settings set id='1'";
CREATE TABLE `automated_emails` (
`id` int(10) unsigned NOT NULL auto_increment,
`product_id` int(10) unsigned ,
`subject` varchar(255) ,
`message` text ,
`rank` tinyint(3) unsigned ,
`delay` int(11) ,
PRIMARY KEY (`id`)
)";
CREATE TABLE downloaded_products (
id INT (11) NOT NULL AUTO_INCREMENT,
member_id INT (11),
product_id INT (11),
downloaded INT (11) DEFAULT '0',
PRIMARY KEY(id)
)";
CREATE TABLE email_log (
`id` int(11) NOT NULL auto_increment,
`member_id` int(11) ,
`product_id` int(11) ,
`email_id` int(11) ,
`last_send` int(11) ,
PRIMARY KEY (`id`)
)";
$db->insert($q);
CREATE TABLE `emails` (
id int(11) unsigned NOT NULL auto_increment,
type varchar(255) ,
subject varchar(255) ,
message text ,
from_name varchar(255) ,
from_email varchar(255) ,
PRIMARY KEY (id)
)";
"INSERT INTO emails VALUES (1, 'Email sent to first time users after payment', 'Welcome', 'Dear {firstname} {lastname}, \r\n\r\nThank You! for joining our site.\r\n\r\nNow you can start advertising and earn instantly for each sale you bring to us.\r\n\r\nYour Details,\r\n\r\nEmail : {email}\r\n\r\nUsername : {username}\r\n\r\nPassword : {password}\r\n\r\nFirst Name: {firstname}\r\n\r\nLast Name: {lastname}\r\n\r\nStormpay Email: {stormpay_email}\r\n\r\nPaypal Email: {paypal_email}\r\n\r\n\r\n\r\nThank you.\r\n\r\nAdmin', '', '')";
"INSERT INTO emails VALUES (2, 'Email sent to affiliates whenever a payment for a sale is made to them', 'You have got a Affiliate Sale', 'Dear {firstname}{lastname},\r\n\r\nYou have received a commission for one of your affilite products in HIT-Pro-Software.com.\r\n\r\nProduct Name : {product_name}\r\n\r\nYou Earned: ${ref_commission} \r\n\r\n\r\nLogin for more details.\r\n\r\nThank You!\r\nAdmin', '', '')";
"INSERT INTO emails VALUES (3, 'Email sent to admin whenever a payment/sale is made', 'A Sale Made', 'Dear Admin,\r\n\r\nA sale has been made.\r\n\r\nProduct Name : {product_name}\r\nProduct Cost : ${product_price}\r\n \r\nAffiliate Name: {firstname} {lastname}\r\nAffiliate Commission : ${ref_commission} \r\n\r\nYour Earning : ${admin_income}\r\n\r\nLogin for more details.\r\n\r\nThank You!\r\nAdmin', '', '')";
"INSERT INTO emails VALUES (4, 'Email sent to existing users after they purchase any other new products', 'Thank you for your purchase', 'Dear {firstname}{lastname},\r\n\r\nThank you for purchasing.\r\n\r\nProduct Name : {product_name}\r\n\r\nProduct Cost : ${product_price}\r\n\r\n\r\nThank You for your support!\r\nAdmin\r\n', '', '')";
CREATE TABLE marketing_banners (
`id` int(11) NOT NULL auto_increment,
`product_id` int(11) ,
`banner_url` varchar(255) ,
`banner_image` varchar(255) ,
PRIMARY KEY (`id`)
)";
CREATE TABLE marketing_emails (
`id` int(11) NOT NULL auto_increment,
`product_id` int(11) ,
`subject` varchar(255) ,
`message` text ,
PRIMARY KEY (`id`)
)";
CREATE TABLE mass_email (
id int(11) NOT NULL auto_increment,
subject varchar(255) ,
message text ,
from_name varchar(255) ,
from_email varchar(255) ,
mid text ,
PRIMARY KEY (id)
)";
CREATE TABLE `member_products` (
`id` int(11) NOT NULL auto_increment,
`member_id` int(11) ,
`product_id` int(11) ,
`date_added` date ,
PRIMARY KEY (`id`)
)";
CREATE TABLE member_session (
`member_id` int(11) NOT NULL DEFAULT '0' ,
`hash` varchar(255) NOT NULL DEFAULT '' ,
`time` int(11) NOT NULL DEFAULT '0'
)";
CREATE TABLE `members` (
`id` int(11) NOT NULL auto_increment,
`firstname` varchar(255) ,
`lastname` varchar(255) ,
`email` varchar(255) NOT NULL DEFAULT '' ,
`username` varchar(255) NOT NULL DEFAULT '' ,
`password` varchar(255) ,
`paypal_email` varchar(255) ,
`stormpay_email` varchar(255) ,
`ip` varchar(255) ,
`date_joined` datetime DEFAULT '0000-00-00 00:00:00' ,
`status` int(11) DEFAULT '0' ,
`referrer_url` varchar(255) ,
`last_login` int(11) ,
`mailing` int(11) DEFAULT '1' ,
`randomstring` varchar(100) ,
PRIMARY KEY (id)
)";
CREATE TABLE `orders` (
`id` int(11) NOT NULL auto_increment,
`member_id` int(11) DEFAULT '0' ,
`product_id` int(11) NOT NULL DEFAULT '0' ,
`payment_type` int(11) ,
`visitor_id` int(11) ,
`paid` int(11) DEFAULT '0' ,
PRIMARY KEY (`id`)
)";
CREATE TABLE products (
`id` int(11) NOT NULL auto_increment,
`product_name` varchar(255) ,
`product_shortname` varchar(255) ,
`price` decimal(15,2) ,
`commission` decimal(15,2) ,
`pay_referrer_first` int(11) DEFAULT '0' ,
`date_added` datetime DEFAULT '0000-00-00 00:00:00' ,
`template_page` text ,
`download_link` varchar(255) ,
`membership_form` text ,
`show_affiliate_url` int(11) ,
`rank` int(11) ,
PRIMARY KEY (`id`)
)";
CREATE TABLE transaction (
`id` int(11) NOT NULL auto_increment,
`order_id` int(11) ,
`transaction_id` varchar(100) ,
`from_email` varchar(255) ,
`to_email` varchar(255) ,
`amount` double ,
`to_admin` int(11) DEFAULT '1' ,
PRIMARY KEY (`id`)
)";
CREATE TABLE visitor_stats (
`id` int(11) NOT NULL auto_increment,
`visited_date` date NOT NULL DEFAULT '0000-00-00' ,
`product_id` int(11) ,
`referrer` int(11) DEFAULT '0' ,
`ip` varchar(255) ,
`randomstring` varchar(255) ,
`order_placed` int(11) DEFAULT '0' ,
PRIMARY KEY (`id`)
)";
CREATE TABLE ipn_args (
id int(11) NOT NULL auto_increment,
randomstring varchar(255) ,
mrand varchar(50) DEFAULT '0' ,
returnrand varchar(50) ,
PRIMARY KEY (id)
)";
Here is the error i get wen i import the sql file!
Quote:
Error
SQL query:
CREATE TABLE `admin` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`username` varchar( 255 ) ,
`password` varchar( 255 ) ,
`webmaster_email` varchar( 255 ) ,
`lastlogin` int( 11 ) ,
PRIMARY KEY ( `id` )
) ";
" INSERT INTO admin
SET username = '$admin_login',
PASSWORD = '$admin_pass',
webmaster_email = '$admin_email' ";
CREATE TABLE `admin_session` (
`admin_id` int(11) NOT NULL auto_increment,
`hash` varchar(255),
`timestamp` int(11),
`last_export` int(11),
PRIMARY KEY (`admin_id`)
)";MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '";
"insert into admin set username='$admin_login',password='$admin_pass',web m' at line 8
__________________
Last edited by peter_budo : Feb 27th, 2008 at 2:29 pm. Reason: Please use [code] tags even for SQL queries, also use full-sentence English. Please do not use "leet" speak or "chatroom" speak.
•
•
•
•
Well n not a mysql expert so i need help with this sql file here r d contents of it.
Quote:[code]
CREATE TABLE `admin` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255),
`password` varchar(255),
`webmaster_email` varchar(255),
`lastlogin` int(11),
PRIMARY KEY (`id`)
)";
"insert into admin set username='$admin_login',password='$admin_pass',web_master_email='$admin_email'";
Maybe your field name is wrong ..
•
•
Join Date: Dec 2007
Posts: 112
Reputation:
Rep Power: 1
Solved Threads: 13
In addition to above suggesstions:
If you are executing this file using mysql or source commands, then you have to use the values instead of PHP variables e.g.
Should be
If you are executing this file using mysql or source commands, then you have to use the values instead of PHP variables e.g.
"insert into admin set username='$admin_login',password='$admin_pass',web master_email='$admin_email'";
insert into admin set username='some admin login',password='password here',web master_email='email@example.com';
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax asp database decimal seperator thousand seperator when using sql server deleting records from ms sql table where columns have duplicate values developer development hacker how to restrict access to a specific file management studio 2005 microsoft msdn news office security software sql sql cache dependency with polling-based invalidation survey vista
- JDBC Driver for SQL Server 2005, Class not found Exception (Java)
- How to print tables in SQL Server 2005 (MS SQL)
- SQL 2005 upgrade questions (MS SQL)
- HOWTO: Share an SQL Connection between multiple forms within the same project (C#)
- Using a Database with C (C++)
- *.dat conversion to *.tax file pls help (C++)
- question about connecting odbc to sql through php script (PHP)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- I need an exampls program in java to store image datatype in ms-sql (MS SQL)
Other Threads in the MySQL Forum
- Previous Thread: Delete tables with non-latin characters
- Next Thread: INSERT VALUES (HTML CODE) problems!


Linear Mode