On Tue, Jun 15, 2010 at 8:58 PM, Jan Reiter the-fal...@gmx.net wrote:
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed this list very
much lately.
This isn't exactly a PHP question, but since mysql is the most popular
database engine used with php, I figured someone
Hi,
this is the solution I came up with, that is over 10 times faster than my
first attemps.
Tested @31,871 entries in table 'picture' and 222,712 entries in table
'picture_attrib_rel'.
Old Version:
SELECT * FROM picture as p
INNER JOIN picture_attrib_rel as pr1
ON (p.pid = pr1.pid)
INNER
-Original Message-
From: Jan Reiter [mailto:the-fal...@gmx.net]
Sent: Wednesday, June 16, 2010 8:55 AM
To: php-general@lists.php.net
Subject: Re: [PHP] SQL Syntax [improved SQL]
Hi,
this is the solution I came up with, that is over 10 times faster than my
first
attemps
[Top-post.]
You'll probably have much better luck on the MySQL General list.
CC'ed on this email.
On Tue, Jun 15, 2010 at 20:58, Jan Reiter the-fal...@gmx.net wrote:
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed this list very
much lately.
This isn't
On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote:
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed this list very
much lately.
This isn't exactly a PHP question, but since mysql is the most popular
database engine used with php, I figured someone here might
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Wednesday, June 16, 2010 3:09 AM
To: Jan Reiter
Cc: php-general@lists.php.net
Subject: Re: [PHP] SQL Syntax
On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote:
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed
: Thanks for forwarding my mail to the MySQL List!
Regards,
Jan
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Wednesday, June 16, 2010 3:09 AM
To: Jan Reiter
Cc: php-general@lists.php.net
Subject: Re: [PHP] SQL Syntax
On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed this list very
much lately.
This isn't exactly a PHP question, but since mysql is the most popular
database engine used with php, I figured someone here might have an idea.
I have 2 tables. Table A containing 2
Hi I am having problems (yep me again) with my sql, I have looked and tried
different things (ASC, DESC, etc) but it same error:
Here is the error:
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 'ORDER BY
$sql = SELECT WorkOrderID AS Work_Order_ID, DATE_FORMAT(StartDate, '%b.
%e, %Y %l:%i %p') AS Start_Date,
DATE_FORMAT(EndDate, '%b. %e, %Y %l:%i %p') AS End_Date, ;
$sql .= Advertiser AS Advertiser_Name,AccountNum AS Account_Number,
Impressions AS Ad_Impressions, ;
$sql .=
On Fri, Dec 5, 2008 at 3:57 PM, Allan Arguelles [EMAIL PROTECTED]wrote:
$sql = SELECT WorkOrderID AS Work_Order_ID, DATE_FORMAT(StartDate,
'%b.
%e, %Y %l:%i %p') AS Start_Date,
DATE_FORMAT(EndDate, '%b. %e, %Y %l:%i %p') AS End_Date, ;
$sql .= Advertiser AS
Umm.. I meant you need to put
$sql .= FROM workorderform ;
between these:
$sql .= AdSize AS Ad_Size, CPM AS CPM_Rate, ;
$sql .= ORDER BY StartDate DESC;
:)
Terion Miller wrote:
On Fri, Dec 5, 2008 at 3:57 PM, Allan Arguelles [EMAIL PROTECTED]wrote:
$sql = SELECT WorkOrderID AS
ah...I also though it was because I didn't have a statement like where
adsize = adsize or something but I tried that and got the same error I have
been getting ...
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
Try this:
$sql = SELECT WorkOrderID AS Work_Order_ID, DATE_FORMAT(StartDate, '%b.
%e, %Y %l:%i %p') AS Start_Date,
DATE_FORMAT(EndDate, '%b. %e, %Y %l:%i %p') AS End_Date, ;
$sql .= Advertiser AS Advertiser_Name,AccountNum AS Account_Number,
Impressions AS Ad_Impressions, ;
$sql .=
Excellent Allan thanks so much, sometimes I think php is causing me
blindness!!
Terion
On Fri, Dec 5, 2008 at 4:26 PM, Allan Arguelles [EMAIL PROTECTED]wrote:
Try this:
$sql = SELECT WorkOrderID AS Work_Order_ID, DATE_FORMAT(StartDate, '%b.
%e, %Y %l:%i %p') AS Start_Date,
On Fri, 2008-12-05 at 16:51 -0600, Terion Miller wrote:
Excellent Allan thanks so much, sometimes I think php is causing me
blindness!!
Terion
On Fri, Dec 5, 2008 at 4:26 PM, Allan Arguelles [EMAIL PROTECTED]wrote:
Try this:
$sql = SELECT WorkOrderID AS Work_Order_ID,
until i started using the techniques for avoiding sql injection, i have been
using a normal insert and select sql query which worked fine.
i have a registration page where a user enters their username and if this
already exists i display a message by executing a select query and if the
username
Hello everybody,
I am trying to create a sql query with php and I do have a syntax problem with
the mysql query.
One row is called plz and I would like to search for a value inside that with
a like statement. Problem is, the system takes the u.plz as a character not as a
table element:
LIKE
Merlin wrote:
SELECT c.name AS city
FROM geo_de.geodb_locations AS c, fix.user AS u
WHERE u.user_id =4 AND c.plz
LIKE %u.plz%;
I believe you want something not unlike this:
WHERE u.user_id = 4
AND c.plz LIKE concat('%', u.plz, '%')
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP
This is the PHP mailing list, not the SQL mailing list ;)
but here is the syntax ( not tested ):
SELECT
c.name AS city
FROM
geodb_locations AS c,
user AS u
WHERE
u.user_id = 4
AND
c.plz LIKE u.plz;
Hello everybody,
I am trying to create a sql query with php and I do
Sugimoto wrote:
Bad query: You have an error in your SQL syntax near 'and Tit like and Aut
like and Auty like ' at line 4
[snip]
foreach ($_GET as $value) {
if (empty($value)) $value = %;
You have an issue here. You're looping through $_GET and attempting to
set a default value (which is
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 26 October 2004 12:01, John Holmes wrote:
Sugimoto wrote:
Bad query: You have an error in your SQL syntax near 'and Tit like
and Aut like and Auty like ' at line 4
[snip]
insert into test values (0,''; DELETE FROM test; ',1);
ERROR 1064: You have an error in your SQL syntax near '' at line 1
what about
insert into test values (0,'\'; DELETE FROM test; ',1);
the character ' is used to denote the beginning and the end of a
field value. If you have this
]
-Original Message-
From: Chris Worth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 12:36 PM
To:[EMAIL PROTECTED]
Subject: [PHP] SQL syntax error in PHP script. dunno what's wrong
hey gang.
here is my sql statement from my php script.
$sql = UPDATE TABLE
] [SMTP:[EMAIL PROTECTED]]
Sent: 01 August 2001 18:03
To: php
Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
wrong
no offense to you sam, but please dont ever simply place
single quotes around values. you have to escape the values
To: php
Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
wrong
no offense to you sam, but please dont ever simply place
single quotes around values. you have to escape the values
*themselves*.
what if someone submitted the form field title as:
$title = '; DELETE FROM
on 8/1/01 11:35 AM, Chris Worth at [EMAIL PROTECTED] wrote:
hey gang.
here is my sql statement from my php script.
$sql = UPDATE TABLE seminar SET
title=$title,speaker=$speaker,event_date=$tdate,time=$time,bldg=$building
,rm=$room WHERE id=$id;
strings in a mysql query need to
]
Subject:[PHP] SQL syntax error in PHP script. dunno what's wrong
hey gang.
here is my sql statement from my php script.
$sql = UPDATE TABLE seminar SET
title=$title,speaker=$speaker,event_date=$tdate,time=$time,bldg=$building
,rm=$room WHERE id=$id;
it appears just like that in my
your own with relative ease:
function db_quote($value) {
return '. preg_replace(/'/, '', $value) .'
}
-Original Message-
From: Matt Greer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 12:45 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] SQL syntax error in PHP script. dunno
]]
Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's wrong
You will need to put single quotes around your variables in your SQL
statement. Like this:
$sql = UPDATE TABLE seminar SET
title='$title',speaker='$speaker',event_date='$tdate',time='$time',bldg='$bu
ilding'
,rm
30 matches
Mail list logo