> -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
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
On Tue, Jun 15, 2010 at 8:58 PM, 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 hav
ards,
Jan
-Original Message-
From: joerg.bru...@sun.com [mailto:joerg.bru...@sun.com]
Sent: Wednesday, June 16, 2010 2:49 PM
To: MYSQL General List
Cc: Jan Reiter
Subject: Re: [PHP] SQL Syntax
Hi!
Daniel Brown wrote:
> [Top-post.]
>
> You'll probably have muc
On Wed, 16 Jun 2010 02:58:31 +0200
"Jan Reiter" wrote:
>
> I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
> A(uid,pid) and another table B, containing 3 fields. The picture ID, an
> attribute ID and a value for that attribute => B(pid,aid,value).
>
>
>
> Table B
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 fields.
ws yet,
> but I can't find that stuff ...
>
> @Dan: 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-gene
gards,
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 wrote:
Hi folks!
I'm kind of ashamed to ask a question, as I h
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 he
[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 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
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,
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,
> DATE
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 .
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
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 Wo
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
>
> $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, ";
>
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
StartD
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 do
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
--
P
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
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 h
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
> [s
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
together in the same string.
>
>HTH
>
>Sam Masiello
>Software Quality Assurance Engineer
>Synacor
>(716) 853-1362 x289
>[EMAIL PROTECTED]
>
> -Original Message-
>From: Chris Worth [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 01, 2001 12:36 PM
&g
>> 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 c
t;
> --
> From: scott [gts] [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
om: scott [gts] [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
ge-
> From: Sam Masiello [mailto:[EMAIL PROTECTED]]
> 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
&
roll 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, 200
MAIL 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 seminar SET
title=$title,speaker=$speaker,event_da
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 quer
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 code.
here is the $sql string echoed to the screen to verify the vari
33 matches
Mail list logo