[PHP-DB] mysql error...

2007-08-28 Thread John Pillion

this is bugging me to no end (no pun intended)...  I am getting the error:

invalid query: 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 'Condition, ConstructType, BldgDimensions, Stories, 
CurrentParking, MaxParking, P' at line 1


I cannot find a thing wrong with this...  any ideas what may be the 
problem? All the data types are either int(11) or varchar(50).


John



INSERT INTO tblBuildings (SiteID, Name, Available, MfgWHSqFt, 
OfficeSqFt, TotalSqFt, MinSqFtAvailable, MaxSqFtAvailable, Condition, 
ConstructType, BldgDimensions, Stories, CurrentParking, MaxParking, 
ParkingSurface, PctOccupied, ClearSpan, CeilingMax, PctAC, PctHeated, 
FloorType, Sprinkled, DHDoors, DHSize, GLDoors, GLSize, RRDoors, RRSize, 
CraneNum, CraneSize, RefrigSize) VALUES ('', '[enter building name]', 
'Y', '', '', '', '', '', '- Select -', '- Select -', '', '', '', '', '- 
Select -', '', '', '', '', '', '- Select -', 'Y', '', '', '', '', '', 
'', '', '', '')


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] mysql error...

2007-08-28 Thread Bastien Koert

Condition is a reserved word in mysql...you will need to change the field name
 
bastien Date: Tue, 28 Aug 2007 18:11:20 -0700 From: [EMAIL PROTECTED] To: 
php-db@lists.php.net Subject: [PHP-DB] mysql error...  this is bugging me to 
no end (no pun intended)... I am getting the error:  invalid query: 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 'Condition, ConstructType, 
BldgDimensions, Stories,  CurrentParking, MaxParking, P' at line 1  I cannot 
find a thing wrong with this... any ideas what may be the  problem? All the 
data types are either int(11) or varchar(50).  JohnINSERT INTO 
tblBuildings (SiteID, Name, Available, MfgWHSqFt,  OfficeSqFt, TotalSqFt, 
MinSqFtAvailable, MaxSqFtAvailable, Condition,  ConstructType, BldgDimensions, 
Stories, CurrentParking, MaxParking,  ParkingSurface, PctOccupied, ClearSpan, 
CeilingMax, PctAC, PctHeated,  FloorType, Sprinkled, DHDoors, DHSize, GLDoors, 
GLSize, RRDoors, RRSize,  CraneNum, CraneSize, RefrigSize) VALUES ('', '[enter 
building name]',  'Y', '', '', '', '', '', '- Select -', '- Select -', '', '', 
'', '', '-  Select -', '', '', '', '', '', '- Select -', 'Y', '', '', '', '', 
'',  '', '', '', '')  --  PHP Database Mailing List (http://www.php.net/) 
To unsubscribe, visit: http://www.php.net/unsub.php 
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE

Re: [PHP-DB] mysql error...

2007-08-28 Thread Chris

John Pillion wrote:

this is bugging me to no end (no pun intended)...  I am getting the error:

invalid query: 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 'Condition, ConstructType, BldgDimensions, Stories, 
CurrentParking, MaxParking, P' at line 1


I cannot find a thing wrong with this...  any ideas what may be the 
problem? All the data types are either int(11) or varchar(50).


condition is a reserved word in mysql 5.

http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MySQL Error 1366

2007-05-28 Thread elk dolk
Hi All,

I want to load data from dump file to MySQL table using LOAD DATA INFILE 
but there is Error 1366 :

mysql LOAD DATA
- INFILE 'D:/SITE/SOMETABLE.SQL'
- INTO TABLE SOMETABLE
- FIELDS TERMINATED BY ','
- OPTIONALLY ENCLOSED BY ''
- LINES TERMINATED BY ')';
ERROR 1366 (HY000): Incorrect integer value:  '--MySQL dump 10.10
--
--S' for column 'ID' at row 1



this is the header of my dump file:


DROP TABLE IF EXISTS `sometable`;
CREATE TABLE `sometableo` (
  `ID` smallint(6) NOT NULL auto_increment,
  `Name` varchar(30) NOT NULL,
  `title` tinytext,
  `description` tinytext,
  `cat` tinytext,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


LOCK TABLES `sometable` WRITE;
/*!4 ALTER TABLE `sometable` DISABLE KEYS */;
INSERT INTO `sometable` VALUES 
(79,'110_1099','AAA','AA','AAA'),(80,'110_1100','AAA','DFGDFGF','AAA'),




any idea for  solving the problem?


   
-
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, 
when. 

Re: [PHP-DB] MySQL Error 1366

2007-05-28 Thread Chris

elk dolk wrote:

Hi All,

I want to load data from dump file to MySQL table using LOAD DATA INFILE 
but there is Error 1366 :


mysql LOAD DATA
- INFILE 'D:/SITE/SOMETABLE.SQL'
- INTO TABLE SOMETABLE
- FIELDS TERMINATED BY ','
- OPTIONALLY ENCLOSED BY ''
- LINES TERMINATED BY ')';
ERROR 1366 (HY000): Incorrect integer value:  '--MySQL dump 10.10
--
--S' for column 'ID' at row 1


LOAD DATA INFILE imports a CSV like file, it can't contain create table 
statements or insert statements.


See the documentation: http://dev.mysql.com/doc/refman/4.1/en/load-data.html


If you have a script with create table  insert statements, use source:

source  (\.)Execute a SQL script file. Takes a file name as an argument.

So

\. filename

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQL Error 1366

2007-05-28 Thread Chetanji

Chetanji says,

This may be a typo of yours.
Look at the header...
 
CREATE TABLE `sometableo`

The 'o' is added by mistake?
Blessings,
Chetanji



elk dolk wrote:
 
Hi All,
 
I want to load data from dump file to MySQL table using LOAD DATA INFILE 
but there is Error 1366 :
 
mysql LOAD DATA
- INFILE 'D:/SITE/SOMETABLE.SQL'
- INTO TABLE SOMETABLE
- FIELDS TERMINATED BY ','
- OPTIONALLY ENCLOSED BY ''
- LINES TERMINATED BY ')';
ERROR 1366 (HY000): Incorrect integer value:  '--MySQL dump 10.10
--
--S' for column 'ID' at row 1
 
 
 
this is the header of my dump file:
 
 
DROP TABLE IF EXISTS `sometable`;
CREATE TABLE `sometableo` (
  `ID` smallint(6) NOT NULL auto_increment,
  `Name` varchar(30) NOT NULL,
  `title` tinytext,
  `description` tinytext,
  `cat` tinytext,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 
LOCK TABLES `sometable` WRITE;
/*!4 ALTER TABLE `sometable` DISABLE KEYS */;
INSERT INTO `sometable` VALUES
(79,'110_1099','AAA','AA','AAA'),(80,'110_1100','AAA','DFGDFGF','AAA'),
 
 
 
 
any idea for  solving the problem?
 
 

-
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's
on, when. 


-- 
View this message in context: 
http://www.nabble.com/MySQL-Error-1366-tf3830472.html#a10846547
Sent from the Php - Database mailing list archive at Nabble.com.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MySQL Error 1251 / phpMyAdmin

2005-02-07 Thread GH
I just installed phpMyAdmin 2.6.1 on my Windows Laptop with PHP
Version 4.3.10  [Build Date  Dec 14 2004 17:46:48] and mySql 4.1.8

I am receiving the enclosed error  when I attempt to go into
phpMyAdmin and do not know how to solve the issue...

Any assistance would be greatful.

Thank you
Gary


//## ERROR RECIEVED //

Welcome to phpMyAdmin 2.6.1

phpMyAdmin tried to connect to the MySQL server, and the server
rejected the connection. You should check the host, username and
password in config.inc.php and make sure that they correspond to the
information given by the administrator of the MySQL server.

Error 
MySQL said:  

#1251 - Client does not support authentication protocol requested by server

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] MySQL error...

2004-12-13 Thread Norland, Martin
 -Original Message-
 From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
   No...  That is just some strange error generated by the cut and
paste.  The IS NOT NU LL that is...
   The other issue with 'tablename'...  I simply typed 'tablename'
in the e-mail because I didn't remember the exact tablename when I was
typing the e-mail.  It does actually provide the name of the table that
the script is working with.

It's very hard to diagnose a problem - unless it's blindingly obvious -
without the exact error, as well as any code which could be contributing
to it.  It's best to cut and paste wherever possible - and if anything
must be 'hidden' to obviously hide it and make note of the replacement.
Just like Johan K# would do.

* K# name has been changed to protect the guilty - in my 'code' it
is typed normally.

Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] MySQL error...

2004-12-10 Thread Norland, Martin
 -Original Message-
 From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
   I have been using a PHP page to update a database table for a
long time now.  
 Unfortunately, I have noticed that frequently when I perform an update
I get back an error
 saying Table 'tablename' doesn't exist.  This is becoming more and
more annoying.
[snip]
 $query = SELECT `id_sys`, atime, gid, shell FROM accounts WHERE atime
IS NOT NU LL AND ctime 
 IS NULL ORDER BY rtime ASC; $result = mysql_query($query, $Prod) or
die(mysql_error()); ?
snip

Strange behavior, can't say I've ever heard of/seen it - however...

IS NOT NU LL is not, strictly speaking, valid sql.  If that's not just
a weird line wrapping issue - that may point to part of your problem.

If the error you're getting back is literally Table 'tablename' doesn't
exist - then you're looking in the wrong code, and somewhere you have
code that says tablename instead of $tablename.  You may want to
grep for tablename to try to track that down.

Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] MySQL error...

2004-12-10 Thread NIPP, SCOTT V \(SBCSI\)
No...  That is just some strange error generated by the cut and
paste.  The IS NOT NU LL that is...
The other issue with 'tablename'...  I simply typed 'tablename'
in the e-mail because I didn't remember the exact tablename when I was
typing the e-mail.  It does actually provide the name of the table that
the script is working with.
Thanks for the feedback.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com



-Original Message-
From: Norland, Martin [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 10, 2004 2:34 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL error...


 -Original Message-
 From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] 
   I have been using a PHP page to update a database table for a
long time now.  
 Unfortunately, I have noticed that frequently when I perform an update
I get back an error
 saying Table 'tablename' doesn't exist.  This is becoming more and
more annoying.
[snip]
 $query = SELECT `id_sys`, atime, gid, shell FROM accounts WHERE atime
IS NOT NU LL AND ctime 
 IS NULL ORDER BY rtime ASC; $result = mysql_query($query, $Prod) or
die(mysql_error()); ?
snip

Strange behavior, can't say I've ever heard of/seen it - however...

IS NOT NU LL is not, strictly speaking, valid sql.  If that's not just
a weird line wrapping issue - that may point to part of your problem.

If the error you're getting back is literally Table 'tablename' doesn't
exist - then you're looking in the wrong code, and somewhere you have
code that says tablename instead of $tablename.  You may want to
grep for tablename to try to track that down.

Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MySQL error...

2004-12-10 Thread NIPP, SCOTT V \(SBCSI\)
I have been using a PHP page to update a database table for a
long time now.  Unfortunately, I have noticed that frequently when I
perform an update I get back an error saying Table 'tablename' doesn't
exist.  This is becoming more and more annoying.  The table obviously
exists as the page that I hit the update button on is populated from
this same page.  Additionally, if I backout and reload the page most of
the time it will work.  Any help would be greatly appreciated.

Mysql   3.23.49
PHP 4.2.3

?php require_once('useraccounts.lib.php');
session_start();
if (!isset($_SESSION['valid_user']))
{
  echo You must be logged in to use this application.  br;
  $return_url = $_SERVER['PHP_SELF'];
  session_register(return_url);
  echo Please a href=\../sa_login.php\ login/a now.  br;
  exit();
} else {
  $sbcuid = $valid_user;
}
while(isset($entry[0])) {
  $tmp = $entry[0];
  $update = UPDATE accounts SET ctime=NOW() WHERE id_sys='.$tmp.';
  $results = mysql_query($update, $Prod) or die(mysql_error());
  array_shift($entry);
}
mysql_select_db($database, $Prod);
$query = SELECT `id_sys`, atime, gid, shell FROM accounts WHERE atime
IS NOT NU
LL AND ctime IS NULL ORDER BY rtime ASC;
$result = mysql_query($query, $Prod) or die(mysql_error());
?

html
head
titleSBCLD User Account Request System/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#CC
p align=centerfont color=#0033CC
size=6strongAdministration/strong
/font/p
p align=centerfont size=4Here are the details for the accounts
approved
and pending creation:/font/p
p align=center

form method=post action=account_details.php
table width=90% bgcolor=#CC cellspacing=0
  tr bordercolor=#CC
td width=20% height=23div align=centerfont
color=#CC size=
3Requesting
  User/font/div/td
td width=10% valign=topdiv align=centerfont
color=#CCSyste
m/font/div/td
td width=10% valign=topdiv align=centerfont
color=#CCPrima
ry Group/font/div/td
td width=10% valign=topdiv align=centerfont
color=#CCD
efault Shell/font/div/td
td width=30% valign=topdiv align=centerfont
color=#CCReque
st Time/font/div/td
td width=10% valign=topdiv align=centerfont
color=#CCC
ompleted/font/div/td
  /tr

?php
  do {
$entry = $list['id_sys'];
$id = split('-', $list['id_sys']);
$sbcuid = $id[0];
$sys = $id[1];
if (isset($list['id_sys'])) {
  echo trtd width=\20%\div
align=\center\.$sbcuid./div/t
d;
  echo td width=\10%\div
align=\center\.$sys./div/td;
  echo td width=\15%\div
align=\center\.$list['gid']./div/
td;
  echo td width=\15%\div
align=\center\.$list['shell']./div
/td;
  echo td width=\30%\div
align=\center\.$list['atime']./div
/td;
  echo td width=\10%\div align=\center\input
name=\entry[]\
type=\checkbox\ value=$entry/div/td/tr;
}
  } while ($list = mysql_fetch_assoc($result));
?

/table

  p align=centerPlacing a check in the completed box will update the
databas
e entry for
this request with a completed time and remove this entry from this
page upon
clicking the Update button below./p
  div align=center
  input type=submit value=Update
  /div
/form

/body
/html

Thanks in advance.  This is really beginning to bug the crap out
of me.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] mysql error and resource ID:

2004-10-18 Thread John Holmes
Stuart Felenstein wrote:
First time setting something like this up. So probably
making some major mistakes.
Anyway I get this message : mysql_error(Resource id
#2)
[snip]
echo  . mysql_error($link);
Read the above line or use an editor that does syntax highlighting. 
Also, you'll want to get the error before you run the rollback() function.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Graham Cossey

See PHP manual  Chapter 6. Types  Strings

for an explanation of single  double quotes.

From the doc:

If the string is enclosed in double-quotes (), PHP understands more escape
sequences for special characters

But the most important feature of double-quoted strings is the fact that
variable names will be expanded.

In your case it would be ' within .

$query = INSERT INTO MainTable (RecordID,UserID,.)
values(null,null,'$f1a','$f2a',...);

Graham.

 -Original Message-
 From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
 Sent: 14 October 2004 15:43
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] mysql error and resource ID:


 Quote as in string or quote as in 'string' ?
 Those two confuse me.

 Stuart
 --- [EMAIL PROTECTED] wrote:

  If any of the variables used to insert data are
  strings ($f1a, $f2a,
  etc...), you'll need to have quotes around them.
 
  dave
 
 
 
 
 
 
  Stuart Felenstein [EMAIL PROTECTED]
 
  10/14/2004 08:26 AM
 
 
 
 
 
  To:
  Graham Cossey [EMAIL PROTECTED],
  [EMAIL PROTECTED]
  cc:
 
 
 
 
 
  Subject:
  RE: [PHP-DB] mysql error and resource ID:
 
 
 
  Not much luck here on placing the
  mysql_error($link);
  I know the server and database is reachable. So I
  imagine the error is happening in the query.  I've
  moved the $link around with no luck.
 
  Stuart
 
  Revised code below:
  --- Graham Cossey [EMAIL PROTECTED] wrote:
 
  ?php
 
  function begin()
  {
  mysql_query(BEGIN);
  }
  function commit()
  {
  mysql_query(COMMIT);
  }
  function rollback()
  {
  mysql_query(ROLLBACK);
  }
  mysql_connect(myserver,myusername, mypassword)
  or die(mysql_error());
 
  mysql_select_db(mydatabase) or die(mysql_error());
 
  $query = INSERT INTO MainTable
  (RecordID,UserID,.)
  values
 
 (null,null,$f1a,$f2a,$f2c,$f2d,$f2e,$f2g,$f5b,$f3m,$f3n,$f3e,$f3f,
 $f3g,$f3h,$f3i,$f3j,
  $f3k,$f3l);
  begin(); // transaction begins
  $result = @mysql_query($query, $link);
 
  if(!$result)
  {
  rollback(); // transaction rolls back
  echo You rolled back .mysql_error($link);
  exit;
  }
  else
  {
  commit(); // transaction is committed
  echo your insertion was successful;
  }
  ?
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Anyone see something wrong here :

My error message is :

0: 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
'd',1,'d',1,1, 31, 33,10/15/2004))' at
line 5

Code:

$query = INSERT INTO MainTable (RecordID,UserID,other
fields..)
values
(null,null,'$f1a',$f2a,$f2c,$f2d,$f2e,$f2g,'$f5b','$f3m','$f3n,'$f3e',$f3f,'$f3g',$f3h,$f3i,
$f3j, $f3k,$f3l)); //not sure if the double ) is
//needed though it doesn't make a diff
begin(); // transaction begins
$result = mysql_query($query);

--- Stuart Felenstein [EMAIL PROTECTED] wrote:

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Yes, actually my apologies to everyone. I figured out
the error.  
So  , yep, I'm down to a problem with the date.
The column is set to date.  I'll go ahead and add the
quotes.

Stuart
--- [EMAIL PROTECTED] wrote:

 Stuart,
 
 The date has forward slashes. These are not
 integers, right? So put single 
 quotes around the whole date, like '10/15/2004'.
 
 dave
 
 
 
 
 
 Stuart Felenstein [EMAIL PROTECTED]
 
 10/14/2004 10:02 AM
 
 
 
  
 
 To:
 Stuart Felenstein [EMAIL PROTECTED]
 cc:
 [EMAIL PROTECTED]
 
 
 
 
 Subject:
 RE: [PHP-DB] mysql error and resource ID:
 
 
 
 Anyone see something wrong here :
 
 My error message is :
 
 0: 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
 'd',1,'d',1,1, 31, 33,10/15/2004))' at
 line 5
 
 Code:
 
 $query = INSERT INTO MainTable
 (RecordID,UserID,other
 fields..)
 values

(null,null,'$f1a',$f2a,$f2c,$f2d,$f2e,$f2g,'$f5b','$f3m','$f3n,'$f3e',$f3f,'$f3g',$f3h,$f3i,
 $f3j, $f3k,$f3l)); //not sure if the double ) is
 //needed though it doesn't make a diff
 begin(); // transaction begins
 $result = mysql_query($query);
 
 --- Stuart Felenstein [EMAIL PROTECTED] wrote:
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MySQL error message...

2003-06-30 Thread Keith Spiller
Hello,

Does anyone know what would cause this message?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\easyphp\www\bod-rse\bod\menu.php3 on line 49...

Here is the code:

?
 $command = SELECT * FROM central_fakepaths WHERE menu != '0' ORDER BY menu
ASC;
 $result  = mysql_query($command,$mysqlHandle);
 $path_directory=explode(/, $HTTP_SERVER_VARS[REQUEST_URI]);

 while ($myrow = mysql_fetch_row($result))
 {
   $count++;

   If   ($path_directory[1]==$devsite)  { $path = $myrow[9];  $target =
$myrow[10]; }
   else   { $path = $myrow[7];  $target =
$myrow[3];  }

   If ($myrow[5] != $count)
   { echo img src=\images/menu-line.gif\ width=\139\
height=\7\br\n;
 $count++;
   }

  // IF MENU VALUE == COMMITTEES
   if ($myrow[2] == Committees)
   {

   echo font face=Verdana size=1img src='images/menu-line.gif'
width=139 height=7BR
 nbsp; a href='.' target='_top'Committees/aBR
 img src='images/menu-line.gif' width=139 height=7BR;

  $currdate = date(Y-m,time());
  $cdate= explode(- , $currdate);
  $cyear= $cdate[0];
  $cmonth   = $cdate[1];

  if ($cmonth =7 AND $cmonth =12) $fyear  = $cyear + 1;
  else  $fyear  = $cyear;
$fyear2 = $fyear - 1;
$syear  = $fyear2 - $fyear;

$commandw = SELECT menuname, type, active, name FROM bod_board_boards
WHERE type='committee' AND active='1' ORDER BY name ASC;
$resultw  = mysql_query($commandw,$mysqlHandle);
while ($myroww = mysql_fetch_row($resultw))
 {
   if ($myroww[0] !=)
{
   echo nbsp; a href='committees.php?bord=$bordcomm=$myroww[3]'
target='_top'$myroww[0]/aBR;
}
 }

   //echo nbsp; a href='?bord=$bord' target='_top'What They Do/a;
   }

   else
   {
 echo nbsp; a href='$path' target='$target'$myrow[2]/abr\n;
   }
 }

?


Any help would be unendingly appreciated...


Keith


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQL error message...

2003-06-30 Thread jeffrey_n_Dyke

mysql knows.  this means your query failed, $command resulted in an invalid
result set.  try adding: or die(mysql_error());  to any call to mysql_query
()so in your code use this:

$result  = mysql_query($command,$mysqlHandle) or die(mysql_error());
- and -
$resultw  = mysql_query($commandw,$mysqlHandle) or die(mysql_error());

that will give you all the info you need.

hth
jeff



   
 
  Keith Spiller
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   
  ve.com  cc:   Keith Spiller [EMAIL 
PROTECTED] 
   Subject:  [PHP-DB] MySQL error 
message...
  06/30/2003 12:47 
 
  PM   
 
   
 
   
 




Hello,

Does anyone know what would cause this message?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in c:\program files\easyphp\www\bod-rse\bod\menu.php3 on line
49...

Here is the code:

?
 $command = SELECT * FROM central_fakepaths WHERE menu != '0' ORDER BY
 menu
ASC;
 $result  = mysql_query($command,$mysqlHandle);
 $path_directory=explode(/, $HTTP_SERVER_VARS[REQUEST_URI]);

 while ($myrow = mysql_fetch_row($result))
 {
   $count++;

   If   ($path_directory[1]==$devsite)  { $path = $myrow[9];  $target =
$myrow[10]; }
   else   { $path = $myrow[7];  $target =
$myrow[3];  }

   If ($myrow[5] != $count)
   { echo img src=\images/menu-line.gif\ width=\139\
height=\7\br\n;
 $count++;
   }

  // IF MENU VALUE == COMMITTEES
   if ($myrow[2] == Committees)
   {

   echo font face=Verdana size=1img src='images/menu-line.gif'
width=139 height=7BR
 nbsp; a href='.' target='_top'Committees/aBR
 img src='images/menu-line.gif' width=139 height=7BR;

  $currdate = date(Y-m,time());
  $cdate= explode(- , $currdate);
  $cyear= $cdate[0];
  $cmonth   = $cdate[1];

  if ($cmonth =7 AND $cmonth =12) $fyear  = $cyear + 1;
  else  $fyear  = $cyear;
$fyear2 = $fyear - 1;
$syear  = $fyear2 - $fyear;

$commandw = SELECT menuname, type, active, name FROM bod_board_boards
WHERE type='committee' AND active='1' ORDER BY name ASC;
$resultw  = mysql_query($commandw,$mysqlHandle);
while ($myroww = mysql_fetch_row($resultw))
 {
   if ($myroww[0] !=)
{
   echo nbsp; a href='committees.php?bord=$bordcomm=$myroww[3]'
target='_top'$myroww[0]/aBR;
}
 }

   //echo nbsp; a href='?bord=$bord' target='_top'What They
   Do/a;
   }

   else
   {
 echo nbsp; a href='$path' target='$target'$myrow[2]/abr\n;
   }
 }

?


Any help would be unendingly appreciated...


Keith


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] MySQL Error

2003-01-28 Thread Rich Gray
Hi Jordan

Made any recent changes to your network configuration? Can you access other
IP ports OK e.g. http port 80? Do you have any firewall protection on your
PC? Can you access MySQL from the command line OK?

Rich
-Original Message-
From: JordanW [mailto:[EMAIL PROTECTED]]
Sent: 28 January 2003 04:37
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Error


I'm getting this error message when I try the following code:

$link = mysql_connect(localhost)
or die(Could not connect);
print (Connected successfully);
mysql_close($link);

The scripts outputs:

Warning: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3

Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3
Could not connect

Any ideas?

Thanks


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] MySQL Error

2003-01-28 Thread John Krewson

Just a shot in the dark, but be sure the socket and port settings are 
correct for your setup (whatever that might be since you did not include 
that info in your post) and that mysql is actually running.

Be sure to scour 
http://www.mysql.com/documentation/mysql/bychapter/index.html
especially the section regarding running MySQL on windows.

Sounds like a MySQL setup problem unrelated to PHP.




JordanW wrote:

I'm getting this error message when I try the following code:

$link = mysql_connect(localhost)
or die(Could not connect);
print (Connected successfully);
mysql_close($link);

The scripts outputs:

Warning: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3

Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3
Could not connect

Any ideas?

Thanks





--
John Krewson
Programmer - SWORPS


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MySQL Error

2003-01-27 Thread JordanW
I'm getting this error message when I try the following code:

$link = mysql_connect(localhost)
or die(Could not connect);
print (Connected successfully);
mysql_close($link);

The scripts outputs:

Warning: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3

Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3
Could not connect

Any ideas?

Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MySQL ERROR 1036: Table 'foo' is read only

2001-08-22 Thread Jay Paulson

Running on RH, Apache. I had this working on Win2K, then switched to Linux
by running the mysqldump then moving over the dump file and runing the
mysql -u root -p  'add_databases.sql'.  It creates the database then the
table and then it tries to populate the table and i get an ERROR 1036: Table
'foo' is read only.  Anyone know why this is happening and or how to fix it?

Thanks,
Jay


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MySQL Error

2001-07-10 Thread Vivek Misra

Dear Experts 

When ever i try to run MySQL under linux it gives me following error 

ERROR 2002 : can't connect to local MYSQL server through socket '/var/lib/mysql.sock' 
(111)

what could be possible remedy/rectification of the above ?

million thx in advance 

Vivek Misra 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] MySQL Error???

2001-06-29 Thread Jonathan Hilgeman

I CC-ed the mailing list by accident. Below is my original reply to Brian.

-Original Message-
From: Jonathan Hilgeman 
Sent: Thursday, June 28, 2001 8:14 AM
To: 'Brian Grayless'
Cc: PHP-DB (E-mail)
Subject: RE: [PHP-DB] MySQL Error???


Hi Brian,
Sounds like you have a tinyint field. Change it to something like int(4) or
bigger, like int(6) or something. TinyInt fields can only hold up to 127, so
when you add another record, the auto-incrementing field you're using cannot
go any higher, so it tries to assign 127, but 127 is already taken. Thats
why you get that error.

- Jonathan

-Original Message-
From: Brian Grayless [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 9:24 AM
To: PHP DB list (E-mail)
Subject: [PHP-DB] MySQL Error???


Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] MySQL Error???

2001-06-29 Thread Brian Grayless

Thanks guys. It was all very helpful and worked great!
Brian

-Original Message-
From: Christian Sandfeld [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 3:06 AM
To: 'Brian Grayless'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] MySQL Error???


Brian,

Sounds to me as if the field you have as primary key is set to type
'TINYINT'. TINYINT's 'signed' range accepts values from -128 to 127, when
set to 'unsigned' it accepts values from 0 to 255.

In your place I would concider changing that column to a 'SMALLINT' and set
it to 'unsigned'. This will allow for values from 0 to 65535 (depending ofc.
on how many digits you set as the max display size).

Hope I helped :)

/Christian

-Original Message-
From: Brian Grayless [mailto:[EMAIL PROTECTED]]
Sent: 27. juni 2001 18:24
To: PHP DB list (E-mail)
Subject: [PHP-DB] MySQL Error???


Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MySQL Error???

2001-06-28 Thread Brian Grayless

Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] MySQL Error???

2001-06-28 Thread Beau Lebens

sounds like your field definition is something like int(2) or something, it
needs to be bigger so that it can handle higher numbers for the unique
primary key :)

// -Original Message-
// From: Brian Grayless [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 28 June 2001 12:24 AM
// To: PHP DB list (E-mail)
// Subject: [PHP-DB] MySQL Error???
// 
// 
// Is anyone familiar with this MySQL error?
// 
// 1062: Duplicate entry '127' for key 1
// I wrote a great bookmark management program that works fine, 
// but everytime I
// insert bookmarks, I insert somewhere over 120 and I start 
// getting this
// error, and it won't add them anymore.  Any suggestions???
// 
// Thanks,
// 
// B R I A N   G R A Y L E S S
//   Web Administrator
//   Premier Resorts
//   www.premier-resorts.com
// 
// P: 435-655-4812
// F: 413-618-1518
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: 
// [EMAIL PROTECTED]
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL Error???

2001-06-28 Thread Dobromir Velev

Hi,
This error occurs when your auto_increment index field is of type TINYINT.
This field type can accept values form -128 to 127 so you cannot add records
with index value greater than 127.
I recommend you change it to INT(11) UNSIGNED which can accept values from 0
to 4294967295.

If you expect to have more records you may consider using BIGINT type

For more info check the MySQL language reference.

Dobromir Velev


-Original Message-
From: Brian Grayless [EMAIL PROTECTED]
To: PHP DB list (E-mail) [EMAIL PROTECTED]
Date: Thursday, June 28, 2001 9:29 AM
Subject: [PHP-DB] MySQL Error???


Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime
I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] MySQL Error???

2001-06-28 Thread Christian Sandfeld

Brian,

Sounds to me as if the field you have as primary key is set to type
'TINYINT'. TINYINT's 'signed' range accepts values from -128 to 127, when
set to 'unsigned' it accepts values from 0 to 255.

In your place I would concider changing that column to a 'SMALLINT' and set
it to 'unsigned'. This will allow for values from 0 to 65535 (depending ofc.
on how many digits you set as the max display size).

Hope I helped :)

/Christian

-Original Message-
From: Brian Grayless [mailto:[EMAIL PROTECTED]]
Sent: 27. juni 2001 18:24
To: PHP DB list (E-mail)
Subject: [PHP-DB] MySQL Error???


Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

B R I A N   G R A Y L E S S
  Web Administrator
  Premier Resorts
  www.premier-resorts.com

P: 435-655-4812
F: 413-618-1518


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL Error???

2001-06-28 Thread Andreas D. Landmark

At 27.06.2001 17:24, Brian Grayless wrote:
Is anyone familiar with this MySQL error?

1062: Duplicate entry '127' for key 1
I wrote a great bookmark management program that works fine, but everytime I
insert bookmarks, I insert somewhere over 120 and I start getting this
error, and it won't add them anymore.  Any suggestions???

Thanks,

It's a code error, not MySQL.

Duplicate entry means that there already is an entry with value '127' for 
key '1'.
Check whether there are some stale bookmarks in your db (use auto_increment
instead).
Also check your code for any errors around the insert statement... 
codesnipplets
would be fine if you want the list to track this down...


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL Error???

2001-06-28 Thread biorn

Most likely, your id (index, auto-increment field, whatever it is) data type
is tinyint which only goes to 127.


Brian Grayless [EMAIL PROTECTED] said:

 Is anyone familiar with this MySQL error?

 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, but everytime I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

 Thanks,

 B R I A N   G R A Y L E S S
   Web Administrator
   Premier Resorts
   www.premier-resorts.com

 P: 435-655-4812
 F: 413-618-1518


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL Error???

2001-06-28 Thread Saul Diaz Carrillo

Hi
You create a unique index (i think primary) an try to enter a key that is
already in the table.

greetings saul
- Original Message -
From: Brian Grayless [EMAIL PROTECTED]
To: PHP DB list (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 12:24 PM
Subject: [PHP-DB] MySQL Error???


 Is anyone familiar with this MySQL error?

 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, but everytime
I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

 Thanks,

 B R I A N   G R A Y L E S S
   Web Administrator
   Premier Resorts
   www.premier-resorts.com

 P: 435-655-4812
 F: 413-618-1518


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL Error???

2001-06-28 Thread Paul Burney

on 6/27/01 9:24 AM, Brian Grayless at [EMAIL PROTECTED] wrote:

 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, but everytime I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

It looks like you set your key column as a TINYINT type rather than say, an
INT.  Try ALTER'ing that column type to INT and see if it works.

Sincerely,

Paul Burney

++
Paul Burney
Webmaster  Open Source Developer
UCLA - GSEIS - ETU
(310) 825-8365
[EMAIL PROTECTED]
http://www.gseis.ucla.edu/
++



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL Error???

2001-06-28 Thread Jason Stechschulte

On Wed, Jun 27, 2001 at 10:24:13AM -0600, Brian Grayless wrote:
 Is anyone familiar with this MySQL error?
 1062: Duplicate entry '127' for key 1

The error means you are attempting to put a second record in with the
value of 127.

 I wrote a great bookmark management program that works fine, but everytime I
 insert bookmarks, I insert somewhere over 120 and I start getting this
 error, and it won't add them anymore.  Any suggestions???

I have one idea.  The column is probably a signed tinyint.  tinyints have
a range of -128 to 127.  When you try to put in anything over 127, the
value is out of range, and so apparently tries to reinsert it as 127.

You could change the column to an unsigned tinyint, which would give you
a range of 0 to 255.  Or an unsigned smallint, which gives you a range
of 0 to 65,535.  Just make sure the column is unsigned, since I doubt
you will be storing negative numbers in the column.  This can be done
easily from the mysql client:

alter table your_table modify your_column smallint unsigned;
-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
/* This bit of chicanery makes a unary function followed by
a parenthesis into a function with one argument, highest precedence. */
 -- Larry Wall in toke.c from the perl source code

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] MySQL Error???

2001-06-28 Thread Mark Roedel

 -Original Message-
 From: Brian Grayless [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 27, 2001 11:24 AM
 To: PHP DB list (E-mail)
 Subject: [PHP-DB] MySQL Error???
 
 
 Is anyone familiar with this MySQL error?
 
 1062: Duplicate entry '127' for key 1
 I wrote a great bookmark management program that works fine, 
 but everytime I insert bookmarks, I insert somewhere over 120
 and I start getting this error, and it won't add them anymore. 
 Any suggestions???

The error message is telling you that you have a key field defined
(that is, a field that must uniquely identify a row in your database),
and that you're trying to insert a row that has a value in that field
that you've already used.

Given that everything seems to work until you get to 127, I'd venture to
guess that it might be an autoincrement column of type 'tinyint'.  If
that's the case, consider changing it to a type with a higher capacity
(see http://www.mysql.com/doc/C/o/Column_types.html for more
information).  If not, then perhaps we might be able to provide more
useful suggestions if you could give a little more information about
your database structure and the source for the part of the program
that's causing problems...


---
Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full.
 LeTourneau University |   -- Henry Kissinger 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]