Sql Server Views Interview Questions 


 

Sql Server Views Interview Questions
Our clients commercial website is hosted on hosting server which MARKETING PEOPLE CHOSE. Hosting server don't have anything like control panel. I had to do all research from beginning. I connect to website by ftp. To change database I have created php template & change queries in it like 'alter table add column', or insert values in table. I have linked mysql database to ms access on my computer & every time I add new column, I had to do link tables process all over again. I can't test sql queries in access because it's linked table & there is lot of confusion between datatypes or mysql & MSAccess. I am finding myself wasting lot of time on hosting related issues than actually working to fix website related code. Is it normal? If we chose good hosting plan do they provide control panel where we can view & MODIFY MYSQL DATABASE DIRECTLY.

THANK YOU.

# Requirements

-- PHP 4 (http://www.php.net)
-- MySQL (http://www.mysql.com)

# MySQL Database Setup

-- Open sql.txt in the main Simple Member folder.
-- Paste the contents into a tool that can execute SQL commands for your MySQL DB

# Installation

-- Follow the MySQL Database Setup Before Continuing
-- Open main.php in the root folder and modify the settings for your server
-- Upload to your server

# How to Use Simple Member

-- At this time there are no admin utilities to view, edit, remove your members, etc.

-- The login / add member script is located at http://domain/to/main/path/index.php


# TROUBLE SHOOTING

-- Make sure that you have created the required database table (users)
-- Make sure all paths are correct in each file use full paths if necessary.
I don't understand these directions!



# Requirements

-- PHP 4 (http://www.php.net)
-- MySQL (http://www.mysql.com)

# MySQL Database Setup

-- Open sql.txt in the main Simple Member folder.
-- Paste the contents into a tool that can execute SQL commands for your MySQL DB

# Installation

-- Follow the MySQL Database Setup Before Continuing
-- Open main.php in the root folder and modify the settings for your server
-- Upload to your server

# How to Use Simple Member

-- At this time there are no admin utilities to view, edit, remove your members, etc.

-- The login / add member script is located at http://domain/to/main/path/index.php


# TROUBLE SHOOTING

-- Make sure that you have created the required database table (users)
-- Make sure all paths are correct in each file use full paths if necessary.
Hi,
I am due to enter negotiations regarding my salary.

I have around 8 years experience in IT from a career point of view, and have trained towards an MCSA (waiting for exams).

I am looking after 14 servers in 3 locations. We are opening another office down south which I will be expected to support

The servers include 4 DC'c, 2 Exchange servers, 1 SQL Server, File Servers, FTP Servers; as well as the company phone system, copiers, software licencing and 3 netscreens and 1 WiFi bridge and to support approx 45 staff

I am also expected to source new technology like media players, etc for the work the company actually does.

We are increasing the servers to around 20 in the next fews months as well implementing company wide VoIP technology and better WAN comms.

What I need to know is should I be asking for more than the £25,000 plus car I am currently on?

My TItle is IT Manager and I am in the East Midlands area

Cheers
What is the command by which we can see all the tables in a database. I mean, how can we view what tables a database contains?
Hai all

I have an issue. I am working in asp.net with sql. I want to print the report from my application.

I can view the report. But how to send it to printer.

In my googling, it is found that we can print through server side or client side or get the report as pdf file.

whether Server side printing means that, the webform report get printed through the LAN connection ? or what does it mean.

The Client side printing uses java script to print.

or how it can be exported to pdf file from reportviewer.

Kindly guide me

Thanks in advance
Whenever I try and enter the mysql code from (http://www.pixel2life.com/publish/tutori...
I get this error.
Does anyone know what's wrong with this? Please help!
Thanks


Error

SQL query:

CREATE TABLE `messages` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`title` VARCHAR( 255 ) NULL ,
`message` TEXT NOT NULL ,
`from` INT( 11 ) NOT NULL ,
`to` INT( 11 ) NOT NULL ,
`from_viewed` BOOL NOT NULL DEFAULT '0',
`to_viewed` BOOL NOT NULL DEFAULT '0',
`from_deleted` BOOL NOT NULL DEFAULT '0',
`to_deleted` BOOL NOT NULL DEFAULT '0',
`from_vdate` DATETIME NULL ,
`to_vdate` DATETIME NULL ,
`from_ddate` DATETIME NULL ,
`to_ddate` DATETIME NULL ,
`created` DATETIME NOT NULL ,
) ENGINE = MYISAM

MySQL said: Documentation
#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 ') ENGINE = MYISAM' at line 31
$imgres = mysql_db_query("database", "select ID, URL1 from contacts where ID=$idno;");
$imgdata = mysql_fetch_row($imgres);
echo mysql_error();
?>

<p align="center"> <img border="1" src="<?php echo $imgdata[1]; ?>" alt="appropriate alt" />
</p>

This code doesn't seem to work....I've tried everything....here's the error messages I'm getting when trying to view it in the browser....

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/nethinga/public_html/Unt... on line 8
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 '' at line 1

What I really don't understand, is that it worked earlier, and I messed with it and now it doesn't. I'm SOOOO FRUSTRATED with this....please help!@!@!@
<html>
<head>

<title>Sign Discussion Board</title>
<link href="index1.css" rel="stylesheet" type="text/css"/>

</head>
<body>

<img src="guestbook.png" align="middle" alt="advert"" width="200" height="50"/>

<?php

$self = $_SERVER['PHP_SELF'];
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
$submit = $_POST['submit'];

#the html form

$form = "<form action=\"$self\" method=\"post\">";
$form.= "Name: <input type=\"text\" name=\"name\" ";
$form.= "size=\"50\" value=\"$name\"> <br>";
$form.= "Email: <input type=\"text\" name=\"email\" ";
$form.= "size=\"50\" value=\"$email\"> <br>";
$form.= "Comments:<br>";
$form.= "<textarea name=\"comments\" cols=\"45\" ";
$form.= "rows=\"4\">$comments</textarea> <br>";
$form.= "<input type=\"submit\" name=\"submit\" ";
$form.= "value=\"Sign\"> </form>";
#on first opening display the form
if( !$submit)
{ $msg = $form; }
else

#redisplay a message and the form if incomplete
if( !$name or !$email or !$comments)
{
$msg = "<b>Please complete all fields</b><br><br>";
$msg.= $form;
}
else

#add the form data to the guestbook database table
{
#connect to MySQL
$conn = mysql_connect("localhost", "ewood","woodie")
or die("Count not connect to database");

#select the database
$rs = mysql_select_db("ewood",$conn)
or die ("Could not select database");

#create the SQL query
if($name and $comments)
{
$sql = "insert into guestbook (name,email, comments)
values (\"$name\",\"$email\",\"$comments\")";
$rs = mysql_query($sql,$conn)
or die ("Could not execute SQL query");
}

#confirm the entry and display a link to view guestbook
if($rs)
{
$msg = "<h3>Thank you - your entry has been saved.</h3>";
$msg.= "<h3><a href = \"guestbook-view.php\">";
$msg.= "View My Guestbook</a></h3>";
}
}
echo($msg);
?>


<div id="products"align = center>


</div>
</body>
</html>
I am using classic ASP / VBScript and Access for a DB. On the first page, I have a dynamic link which goes to a details page for a record in the images table of my DB.

The link on the first page looks like this:

http://www.mydomain.net/cp/cp-phoDel.asp...

The code I am using in the details page to set the RS is this:

sql = "SELECT * FROM images WHERE id = '" & id & "'"
Set rsPho = Server.CreateObject("ADODB.Recordset")
rsPho.Open sql, conn, 3, 3

"id" is a field in the images table of the database. It's data type is set to autoNumber and for some reason I get the feeling that's part of my problem. Since this is the only unique identifier in the table, I need to use it, but I think I'm calling it wrong in my sql.

This is the error I'm getting.
Microsoft JET Database Engine error '80040e07'

Data type mismatch in criteria expression.

/cp/cp-phoDel.asp, line 21

That line is the sql i pasted at the top.

Thanks guys.
Hello I am trying to view a website but it never loads for me! I am trying to take an online course but whenever I try to log in it goes to a page with this on it. But if I use my friends computer it can load. So can anyone help me?

Server Error in '/lms_engine' Application.
--------------------------------------...

String or binary data would be truncated.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.

Source Error:


Line 634:
Line 635: myCommand = new SqlCommand(strSQL,myConnection);
Line 636: myCommand.ExecuteNonQuery();
Line 637:
Line 638:


Source File: c:\inetpub\vhosts\conceptformula.com\htt... Line: 636

Stack Trace:


[SqlException (0x80131904): String or binary data would be truncated.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnEr... exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnect... exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExc... stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunB... runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlCommand.RunExec... methodName, Boolean async) +196
System.Data.SqlClient.SqlCommand.Interna... result, String methodName, Boolean sendToPipe) +269
System.Data.SqlClient.SqlCommand.Execute... +135
lms_engine.visitor.home_sql.Traiter_Logi... in c:\inetpub\vhosts\conceptformula.com\htt...
lms_engine.visitor.home_sql.Page_Load(Ob... sender, EventArgs e) in c:\inetpub\vhosts\conceptformula.com\htt...
System.Web.Util.CalliHelper.EventArgFunc... fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegat... sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Bo... includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436




--------------------------------------...
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
it says something about my sql syntax:



user warning: 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 'INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.' at line 1 query: pager_query INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 2 AND na.realm = 'term_access'))) AND ((n.moderate != 1 OR n.uid = 8164)) in /home/sky7ani/public_html/includes/datab... on line 164.
user warning: 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 'INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.' at line 1 query: pager_query INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 2 AND na.realm = 'term_access'))) AND ((n.moderate != 1 OR n.uid = 8164)) LIMIT 0, 42 in /home/sky7ani/public_html/includes/datab... on line 164.


what does this mean and how do i fix it??
i get this error when i execute the PHP here there is no problem entering data its only when the submit button is pressed that the error happens.Please help Im stuck and a newbie in php!

New member registration
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 ' 1, 0, 0, 0, '2007-01-19 22:12:42', 0, '2007-01-19 22:12:42', 'n

<?php
session_start();
session_register("sess_data");
session_register("ref");
session_register("sess_name");
session_register("sess_passwd");
include("vars.php");
include("headfoot.php");
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
if ($_SERVER['REMOTE_ADDR']=='127.0.0.1') {$_SERVER['REMOTE_ADDR']=$_SERVER['HTTP_...
if ($_GET['ref'] && is_numeric($_GET['ref'])) {
$rck = mysql_query("SELECT * FROM user WHERE id=$_GET[ref] && status='Active'");
if (mysql_num_rows($rck) != 0) {
$acctype = mysql_result($rck, 0, "acctype");
$creditme = mysql_result(mysql_query("SELECT rpgebonus FROM acctype WHERE id=$acctype"), 0);
$_SESSION['ref'] = $_GET['ref'];
$ipis = $_SERVER['REMOTE_ADDR'];
$validip = 'no';
if (is_string($ipis) && ereg('^([0-9]{1,3})\.([0-9]{1,3})\.' . '([0-9]{1,3})\.([0-9]{1,3})$', $ipis, $sect)) {
if ($sect[1] <= 255 && $sect[2] <= 255 && $sect[3] <= 255 && $sect[4] <= 255) {
$validip = 'yes';
$recip = "$sect[1].$sect[2].$sect[3]";
} else {
$validip = 'no';
}
} else {
$validip = 'no';
}
if ($validip == 'yes' && $recip != "" && $creditme > 0) {
$ressu = mysql_query("SELECT * FROM referstats WHERE usrid=$_GET[ref] && refip='$recip'") or die (mysql_error());
if (mysql_num_rows($ressu) == 0) {
$todayis = date("Y-m-d");
$timeis = date("H:i:s");
$htt_ref = $_SERVER['HTTP_REFERRER'];
if ($htt_ref == "") {
$htt_ref = "Direct Request/Referring Info Blocked";
}
$updateit = mysql_query("INSERT INTO referstats (usrid, orgip, refip, cdate, ctime, httpref, browser) VALUES ($_GET[ref], '$ipis', '$recip', '$todayis', '$timeis', '$htt_ref', '".$_SERVER['HTTP_USER_AGENT']."')") or die (mysql_error());
if ($creditme > 0) { $swe = mysql_query("UPDATE user SET credits=credits+$creditme, rpage_credits=rpage_credits+$creditme, lifetime_credits=lifetime_credits+$credi... WHERE id=$_GET[ref]") or die (mysql_error()); $iearned_n = "I just earned <b>$creditme</b> credit(s) for showing you this page!"; }
}
}
} else {
$_GET['ref'] = 0;
}
}
uheader();
include("main_page.php");
ufooter();
mysql_close;
exit;
?>

HERES THE BATABASE sqlinfo

CREATE TABLE 7stat (
usrid int(11) default NULL,
date date default NULL,
time time default '00:00:00',
pg_views int(11) default '0',
num float default NULL,
received_pay char(3) default 'no'
) TYPE=MyISAM;

CREATE TABLE 7statsite (
siteid int(11) default NULL,
date date default NULL,
last_hit_time time default '00:00:00',
num int(11) default NULL
) TYPE=MyISAM;

CREATE TABLE abuse (
id int(11) NOT NULL auto_increment,
siteid int(11) default NULL,
usrid int(11) default NULL,
text text,
date timestamp(14) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE acctype (
id int(11) NOT NULL auto_increment,
name varchar(100) default NULL,
descr text,
ratemin float default '0',
ratemax float default '0',
cost float default '0',
cashout float default '0',
commissions float default '0',
min_sites int(11) default '0',
monthly_bonus float default '0',
upg_time int(11) default '0',
rpgebonus float default '0',
rbonuses varchar(100) default NULL,
levels varchar(100) default NULL,
ptc_levels varchar(100) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

INSERT INTO acctype VALUES (1, 'Free Member', 'Free account', '0.5', '0.8', '0', '15', '0.1', 10, '0', 0, 0.5, '100,50,30,20,10', '20,10,5,5,5', '20,10,5,5,5');
INSERT INTO acctype VALUES (2, 'Upgraded Member', '1:1 Upgraded Membership<br>\r\n1:1 Surf Ratio!<br>Purchase 1 Upgrade Credit and automatically upgrade to 1:1 Upgraded Status!', '0.8', '1', '10', '10', '0.1', 100, '1000', 365, 1, '100,50,30,20,10', '30,20,10,5,5', '20,10,5,5,5');

CREATE TABLE ad_info (
ad_id int(11) NOT NULL auto_increment,
ad_name varchar(100) NOT NULL default '',
type int(11) NOT NULL default '0',
link_url text NOT NULL,
banner_url text NOT NULL,
h int(11) NOT NULL default '0',
w int(11) NOT NULL default '0',
alt varchar(100) NOT NULL default '',
bottom_text varchar(100) NOT NULL default '',
mouse_text varchar(100) NOT NULL default '',
html text NOT NULL,
num_allow_exp int(11) NOT NULL default '0',
num_exp int(11) NOT NULL default '0',
num_clicks int(11) NOT NULL default '0',
prob int(11) NOT NULL default '0',
win int(11) NOT NULL default '0',
adv_user int(11) default '0',
date varchar(10) NOT NULL default '',
PRIMARY KEY (ad_id)
) TYPE=MyISAM;

CREATE TABLE admin (
field varchar(20) default NULL,
value varchar(255) default NULL
) TYPE=MyISAM;

INSERT INTO admin VALUES ('login', 'admin');
INSERT INTO admin VALUES ('email', NULL);
INSERT INTO admin VALUES ('passwd', 'admin');
INSERT INTO admin VALUES ('lastaccess', '0');
INSERT INTO admin VALUES ('lastac', '0');
INSERT INTO admin VALUES ('lastacip', '0.0.0.0');
INSERT INTO admin VALUES ('lastip', '0.0.0.0');
INSERT INTO admin VALUES ('lstcrn', '0000-00-00');

CREATE TABLE adminprops (
field varchar(6) default NULL,
value float default '0'
) TYPE=MyISAM;

INSERT INTO adminprops VALUES ('inibon', '1000');
INSERT INTO adminprops VALUES ('insbon', '1');
INSERT INTO adminprops VALUES ('reftim', '6');
INSERT INTO adminprops VALUES ('negact', '0');
INSERT INTO adminprops VALUES ('contex', '5');
INSERT INTO adminprops VALUES ('contey', '2');
INSERT INTO adminprops VALUES ('contcx', '6');
INSERT INTO adminprops VALUES ('contcy', '0.005');
INSERT INTO adminprops VALUES ('surplu', '0');
INSERT INTO adminprops VALUES ('csurpl', '0');
INSERT INTO adminprops VALUES ('sharec', '10');
INSERT INTO adminprops VALUES ('sharea', '1000');
INSERT INTO adminprops VALUES ('inact', '180');

CREATE TABLE banned_emails (
id int(11) NOT NULL auto_increment,
value varchar(255) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

INSERT INTO banned_emails VALUES (1, '*@mail.com');

CREATE TABLE banned_ipadds (
id int(11) NOT NULL auto_increment,
value varchar(15) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE banned_sites (
id int(11) NOT NULL auto_increment,
domain varchar(255) default NULL,
type char(1) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE banner (
id int(11) NOT NULL auto_increment,
imgurl varchar(255) default NULL,
widtheight varchar(24) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE cashout_history (
id int(11) NOT NULL auto_increment,
usrid int(11) default '0',
amount float(10,2) default '0.00',
descr varchar(100) default NULL,
pay_merch varchar(50) default NULL,
paid_to varchar(150) default NULL,
cdate date default '0000-00-00',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE comission_history (
id int(11) NOT NULL auto_increment,
paid_to int(11) default '0',
usrid int(11) default '0',
wasfor varchar(100) default NULL,
amount float(11,2) default '0.00',
vdate date default '0000-00-00',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE faq (
id int(11) NOT NULL auto_increment,
quest text,
answ text,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE gp_info (
gp_id int(11) NOT NULL auto_increment,
gid int(11) NOT NULL default '0',
ad_id int(11) NOT NULL default '0',
ad_prob int(11) NOT NULL default '0',
PRIMARY KEY (gp_id)
) TYPE=MyISAM;

CREATE TABLE gp_name (
id int(11) NOT NULL auto_increment,
gp_name varchar(100) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE html (
type varchar(5) default NULL,
content text
) TYPE=MyISAM;

INSERT INTO html VALUES ('terms', 'Enter your site terms and conditions here');
INSERT INTO html VALUES ('priva', 'Enter your site privacy-policy here');
INSERT INTO html VALUES ('1page', 'Enter you program details here (signup bonuses, referral earnings etc.. etc..).');

CREATE TABLE investment_history (
id int(11) NOT NULL auto_increment,
usrid int(11) default '0',
amount float(10,2) default '0.00',
descr varchar(100) default NULL,
is_from varchar(50) default '0',
processor varchar(100) default NULL,
adate date default '0000-00-00',
expired char(3) default 'no',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE member_refs (
mem_id int(11) NOT NULL default '0',
ref_id int(11) NOT NULL default '0',
UNIQUE KEY uniqueness (mem_id,ref_id),
KEY usersid (mem_id),
KEY upline (ref_id)
) TYPE=MyISAM;

CREATE TABLE merchant_codes (
id int(11) NOT NULL auto_increment,
name varchar(100) default NULL,
code text,
PRIMARY KEY (id)
) TYPE=MyISAM;

INSERT INTO merchant_codes VALUES (1, 'PayPal', 'Code here');
INSERT INTO merchant_codes VALUES (2, 'E-Gold', 'E-Gold Code');
INSERT INTO merchant_codes VALUES (3, 'StormPay', 'Code with Substitutions here [user] [cost] etc...');

CREATE TABLE monthly_stats (
id int(11) NOT NULL auto_increment,
usrid int(11) default '0',
days_paid_roi int(11) default '0',
past_earnings float(10,5) default '0.00000',
roi_earned float(10,4) default '0.0000',
coms_earned float(10,4) default '0.0000',
sbcash_earned float(10,5) default '0.00000',
ptc_cash_e float(10,4) default '0.0000',
refptc_cash float(10,4) default '0.0000',
misc_earned float(10,4) default '0.0000',
tot_owed float(10,5) default '0.00000',
paid_out float(10,3) default '0.000',
monthis int(2) default '0',
yearis int(4) default '0',
this_month date default '0000-00-00',
month_transfer char(3) default 'no',
earn_pay char(3) default 'no',
paidout char(3) default 'no',
finalized char(3) default 'no',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE other_history (
id int(11) NOT NULL auto_increment,
usrid int(11) default '0',
amount float(10,2) default '0.00',
descr varchar(100) default NULL,
is_from varchar(50) default '0',
adate date default '0000-00-00',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE ptc_orders (
ptcid int(11) NOT NULL auto_increment,
type enum('banner','text') NOT NULL default 'banner',
type2 enum('cash','credit') NOT NULL default 'cash',
userid int(11) default NULL,
linkid varchar(25) default NULL,
banurl varchar(200) default NULL,
linkurl text NOT NULL,
linktxt text,
clicks_remain int(11) NOT NULL default '0',
amt_sent int(11) NOT NULL default '0',
date_sent date default '0000-00-00',
date_done date default '0000-00-00',
cash_click float default '0',
credit_click float default '0',
adtimer int(5) NOT NULL default '0',
day_lock int(5) NOT NULL default '0',
PRIMARY KEY (ptcid)
) TYPE=MyISAM;

CREATE TABLE ptc_tracking (
userid int(11) default NULL,
banlinkid varchar(25) default NULL,
cdate date default NULL
) TYPE=MyISAM;

CREATE TABLE referstats (
id int(11) NOT NULL auto_increment,
usrid int(11) default '0',
orgip varchar(15) default NULL,
refip varchar(15) default NULL,
httpref varchar(255) default NULL,
browser varchar(255) default NULL,
cdate date default NULL,
ctime time default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE sellcredit (
id int(11) NOT NULL auto_increment,
name varchar(255) default NULL,
descr text,
cost float default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;

INSERT INTO sellcredit VALUES (1, '1000 Site Credits', '1000 Site Credits', '5');

CREATE TABLE site (
id int(11) NOT NULL auto_increment,
usrid int(11) default NULL,
name varchar(255) default NULL,
url varchar(255) default NULL,
lang varchar(30) default NULL,
state varchar(30) default NULL,
credits float default '0',
totalhits int(11) default '0',
hitslastmail int(11) default '0',
hour varchar(13) default '0',
cph int(11) default '0',
cth int(11) default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE tads (
id int(11) NOT NULL auto_increment,
text text,
PRIMARY KEY (id)
) TYPE=MyISAM;

CREATE TABLE user (
id int(11) NOT NULL auto_increment,
name varchar(100) default NULL,
email varchar(100) default NULL,
passwd varchar(20) default NULL,
pay_to int(11) default '0',
payout_address varchar(150) default NULL,
ref int(11) default '0',
invested float(10,2) default '0.00',
acctype int(11) default NULL,
credits float default '0',
roi_cash float(10,4) default '0.0000',
cshfrmallrefs float(10,5) default '0.00000',
lifetime_cash float(10,3) default '0.000',
lifetime_paid float(10,2) default '0.00',
lifetot_roi float(10,5) default '0.00000',
joindate datetime default NULL,
lastmail date default '0000-00-00',
minmax int(11) default NULL,
crdsfrmallrefs float default '0',
rbon_credits float default '0',
rpage_credits float default '0',
lifetime_credits float default '0',
lifetime_pages int(11) default '0',
sb_credits float default '0',
sb_cash float(10,5) default '0.00000',
ptc_clicks int(11) default '0',
ptc_crds float default '0',
ptc_cash float default '0',
lastroi date default '0000-00-00',
lastaccess datetime default NULL,
lastsurfed datetime default '0000-00-00 00:00:00',
upgrade_ends date default NULL,
premregdate date default '0000-00-00',
premmp int(11) default '0',
toref float default '0',
cshtoref float(10,5) default '0.00000',
commstoref float(10,4) default '0.0000',
allow_contact char(3) default 'yes',
status varchar(20) default NULL,
ip_address varchar(15) default NULL,
ac int(11) default '0',
PRIMARY KEY (id),
UNIQUE KEY email (email)
) TYPE=MyISAM;


PLEASE HELP
Through PHPMyAdmin, I'm able to create tables in my database. However, when I try to create a View using a very simple SQL statement, I get an error!

Here is the statement:
CREATE VIEW myView AS SELECT * FROM utilisateur;

Here is the error message:
#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 'VIEW myView AS Select * from utilisateur' at line 1


Any ideas? I don't have duplicates names and the table utilisateur does exist. MYSQL is version 4.1.22
An error occurred trying to update the database
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 '-mtk_99k_org_auth_access ( group_id mediumint(8) DEFAULT '0' NOT NULL, for' at line 1


I have no clue how to view the Syntax or w/e
this is for a phpbb installation somebody please help me :]
123456Showing 1 to 15 of 80