Hi Grega,
Probably you wanna define a primary key, if so, then change from
uniqueid to primary key.
2011/5/6 Curtis Maurand cur...@maurand.com:
engine=
--C
Grega Leskovšek wrote:
Can smbd please look at this sentence - I got an error and do
not
know how to fix it - I am still very
engine=
--C
Grega Leskov¹ek wrote:
Can smbd please look at this sentence - I got an error and do
not
know how to fix it - I am still very unfamiliar with
MYSQL:
CREATE TABLE log ( idlog int auto_increment
not null, imepriimek
varchar(50), clock timestamp, action
varchar(30),
Hello Grega,
What do you mean by uniqueid(idlog)?
--
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
Original message
From:
On Thu, May 5, 2011 at 10:29, Grega Leskovšek legr...@gmail.com wrote:
Can smbd please look at this sentence - I got an error and do not
know how to fix it - I am still very unfamiliar with MYSQL:
CREATE TABLE log ( idlog int auto_increment not null, imepriimek
varchar(50), clock
By the way it installed MySQL 6 and PHP 5.0.4 and from the console this
command does not work:
mysql -u root -p
but only this works:
mysql -h hostname -u root -p
I tried doing the same while connecting to the database via php but it
does not work.
Rahul wrote:
I am using Fedora Core 4. As
Hello Wessley,
Friday, July 1, 2005, 10:55:16 AM, you wrote:
WR $sql = LOAD DATA LOCAL INFILE '/path/to/file.txt' INTO TABLE
WR `mytable` FIELDS TERMINATED BY '\t' ESCAPED BY '\' LINES TERMINATED
WR BY '\n';
WR mysql_query($sql) or die('brbr'.mysql_error());
WR I get this MySQL error:
WR You
Mikey wrote:
I have not changed any of my hostname/username/password code
in the last 6 months and I can still connect to
mysql.timerescue.co.uk via the command line interface.
Has anyone seen this before - any ideas at all - just
started happening
today! :o(
Strange indeed.
I tried to
it cant find your host
mysql.timerescue.co.uk
try use an ip address... or try connect via the command line.
Glen Beamson wrote:
Hi,
I have suddenly started getting an 'unknown host' error when trying to connect via php (see below).
Unknown MySQL Server Host 'mysql.timerescue.co.uk' (0)2005
I
I have not changed any of my hostname/username/password code
in the last 6 months and I can still connect to
mysql.timerescue.co.uk via the command line interface.
Has anyone seen this before - any ideas at all - just
started happening
today! :o(
Strange indeed.
I tried to connect
query=SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES'
AND `county` = 'clark' AND (`price` '15' OR `price` = '20');;
if that doesn't work - break it down into individual parts and find out
where the problem is.
Respectfully,
Ligaya Turmelle
---
Life is a game... so have
Richard Kurth wrote:
Could somebody tell me way these query gets a error 1064 and does not
work.
no. wrong list.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
Try:
SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type = 'RES'
AND listing.county = 'clark' AND (listing.price 15 OR listing.price
=20)
Try to not use the word type. Do not know what it is but I have some
problems using it. In the event you have weird problems, try
Travis Conway wrote:
Try:
SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type =
'RES' AND listing.county = 'clark' AND (listing.price 15 OR
listing.price =20)
Once again you have posted to the wrong list. Please send this message
to the mysql list. This is the php list.
Hi All,
I found out how to do it already. Thanks for the help.
mysql_error() was the key..
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-Original Message-
From: Ow Mun Heng
Sent: Wednesday, June 25, 2003 10:03 AM
To: [EMAIL PROTECTED]
Well, are you getting a valied response from the database?
Perhaps it would be nice to add some error handling into your code...
i.e.:
$mysql_result = mysql_query($query, $mysql_link)
or die(Invalid query: $query);
or echo out mysql_error();
GWAD Mailinglist wrote:
Hi,
I have following
$mysql_result = mysql_query($query, $mysql_link);
I am not sure if this is your only problem or not, but mysql_result(); is a
function in php. Using a function name as a variable seems like it will
just lead to confusion to me. I'd try to avoid it.
-- line 36 while($row =
You need to do some error handling, as in:
$mysql_result = mysql_query($query, $mysql_link);
// get each row
-- line 36 while($row = mysql_fetch_row($mysql_result))
Make sure $mysql_result is a valid resource as PHP
is telling you it's not. Here's one way:
if
-- line 36 while($row = mysql_fetch_row($mysql_result))
Anyway, where do you define $row?
HTH
-Craig
DOH! it's been a long one...
-Craig
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Perhaps you should try and do some error checking on the mysql_select_db()
function, like printing out mysql_error().
Also, for the permissions issues, mysql has a very comprehensive online
documentation on user permissions. Check them out, you may also wish to try
and connect to the database
I did that and it didn't output anything...
- Original Message -
From: Brad Bonkoski [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]
Cc: PHP List [EMAIL PROTECTED]
Sent: Sunday, December 01, 2002 2:55 PM
Subject: Re: [PHP] MySQL Error
Perhaps you should try and do some error checking
Looks like you're updating your table so instead of "INSERT INTO...", try:
"UPDATE malibu_data SET ..."
HTH,
- E
I get this error:
Error submiting paragraph.You have an error in your SQL syntax near
'WHERE page_name='features' AND par_id='13' ' at line 1
But my code, I think is fine:
//
it's the WHERE clause, it's illegal there.
what are you trying to do? if you want to change the heading paragraph
columns of every row in malibu_data where the page_name par_id match
your values, this should be an UPDATE.
if you want to create a new record in malibu_data for every record
Yes, thank you very much, I shouldn$B!G(Bt code late at night without any
caffeine in me.
- Vic
-Original Message-
From: @ Edwin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 12:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql error
Looks like
try add_slashes($string) before inserting into the database, or turn on
magic quotes in php.ini
justin french
on 15/07/02 5:57 PM, Wilbert Enserink ([EMAIL PROTECTED]) wrote:
Hi all,
has anybody ever seen this? And knows what it means?
thx.
You have an error in your SQL syntax near
Justin French wrote:
try add_slashes($string) before inserting into the database, or turn on
magic quotes in php.ini
Or
Mysql_Escape_String()
http://www.php.net/manual/en/function.mysql-escape-string.php
Or
Mysql_Real_Escape_String()
The mysql_select_db() function is going to return a handle. You need to
capture that handle and use it as the second parameter in your mysql_query()
function. Although this is not required in certain cases where the server
automatically knows which database to work with, chances are thats whats
Ha.. Aussie person too eh?
Ok.. Have you recently updated your php system?
Reason I ask is the way you are using the functions mysql_connect and
mysql_select_db are quite ... bad to say the least
You should have permissions setup for a root account or something in your
mysql.user table and
Thanks radix!
I'm new to PHP that's why..
so, what should I do to fix this?
please advise..
thanks again.
Dani
The_RadiX wrote:
Ha.. Aussie person too eh?
Ok.. Have you recently updated your php system?
Reason I ask is the way you are using the functions mysql_connect and
Warning: Access denied for user: 'nobody@localhost' (Using password:
NO)
in /www/host/doms/com/smpk2/create_tables.php on line 15
Hmm...let me see if I can decrypt that message. Apparently you were
denied access with user nobody and you were not using a password.
Read the manual page on
- Original Message -
From: Navid Yar [EMAIL PROTECTED]
$query = select email from customers // Check for duplicate
entry
. where email = $email;
$query = stripslashes($query);
$result = mysql_query($query);
$num_results = mysql_num_rows($result); // Get the number of
rows in
Does anyone have any idea why this is giving me a Warning: Supplied
argument is not a valid MySQL result resource in... error?
You'll have to give more code, which line you get that error from, etc., to
give us a better idea why it's not working.
However, a quick tip:
$crdate = date(Y-m-d);
Hi,
So far the best way to troubleshoot mysql+php for me has been to add an or die after
the sql exec.
$crdate = date(Y-m-d);
$result = mysql_query(SELECT * FROM sites WHERE creation_date = '$crdate'
AND status = 'T') or die ('CAN NOT EXEC SQL');
Or you can do
$sql = SELECT * FROM sites
On Fri, 17 Aug 2001 16:49, ERISEN, Mehmet Kamil wrote:
Hello All,
I receive the following warning message. When I reload the page, the
message is the error message does not show up again. Funny thing is,
that there are other parts of the page generated from the same database
using the same
my guess would be that sgid is a character field. if this isn't the case
then try hardcoding a known id into the query and seeing what happens. It
could also be that the connection has failed, try something like:
if ($connection = mysql_connect())
{
...
$id = rand(1,2);
$query =
]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 11:05 AM
Subject: Re: [PHP]MySQL error, what's wrong here..
Hi Chris,
If you're using MySQL 3.23+, you might want to consider using something
like:
SELECT songname FROM mp3 ORDER BY RAND() LIMIT 1
Not that this answers your original
Try:
$query = SELECT songname FROM mp3 WHERE sgid = ' .$id.';
an SQL query requires you to quote strings.
james
-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP]MySQL error, what's wrong here..
on with that...
chris
- Original Message -
From: James Bogosian [EMAIL PROTECTED]
To: Chris Cocuzzo [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 7:25 PM
Subject: RE: [PHP]MySQL error, what's wrong here..
Try:
$query = SELECT songname FROM mp3 WHERE sgid = ' .$id.';
an SQL query
, then
inside the brackets, you fetch a second (non-existing) result into $mp3d
again. Try it without the third line of that segment.
james
-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 7:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP]MySQL error
Chris Cocuzzo pressed the little lettered thingies in this order...
alright, new problem, no more errors, but there's just nothing...here's the
code:
$query = SELECT name FROM mp3 WHERE songid = ' .$id.';
a href=http://www.fplg.net/stream.php?songid=2; class=hov1/a
Uhh... maybe I'm
: Monday, July 23, 2001 10:38 PM
Subject: Re: [PHP]MySQL error, what's wrong here..
Chris Cocuzzo pressed the little lettered thingies in this order...
alright, new problem, no more errors, but there's just nothing...here's
the
code:
$query = SELECT name FROM mp3 WHERE songid = ' .$id
On Tue, 24 Jul 2001 14:10, Chris Cocuzzo wrote:
- Original Message -
From: Christopher Ostmo [EMAIL PROTECTED]
To: Chris Cocuzzo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 10:38 PM
Subject: Re: [PHP]MySQL error, what's wrong here..
Chris Cocuzzo pressed
I know a lot of people are having this problem too because there is a bug report with
the same/similar description for many
different platforms.
Here is how I got things to work. I did this with the latest php4 dev CVS snapshot
(which also has the same error) but it should
work on 4.0.6 also.
Shouldn't it be:
mysql_query(UPDATE user_polls SET url = '$file_name' WHERE uid = '$UserName' AND type
= '$type) or die (mysql_error());
Maybe I'm wrong.
--
Tyler Longren
[EMAIL PROTECTED]
Currently Unemployed
www.noworkfortyler.com
On Tue, 22 May 2001 17:00:35 EDT
[EMAIL PROTECTED] wrote:
, May 22, 2001 2:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql error, dont see why.. please help
Shouldn't it be:
mysql_query(UPDATE user_polls SET url = '$file_name' WHERE uid =
'$UserName' AND type = '$type) or die (mysql_error());
Maybe I'm wrong.
--
Tyler Longren
Looks like this may be in wrong order:
url = '$file_name')
^
I think you have ' when it should be '
Here is the command.
mysql_query(UPDATE user_polls WHERE uid = '$UserName' AND type = '$type'
SET
url = '$file_name') or die(mysql_error());
Output
You
mysql_select_db("jamesmc",$db);
$result = mysql_query("SELECT * FROM comment WHERE pid='$poid'
ORDER by
cid desc",$db);
$comm = mysql_fetch_array($result);
This is in the FAQ, I think... Better re-read that.
Start using or die() a lot:
mysql_select_db("jamesmc",
46 matches
Mail list logo