Ethan - is error checking turned on as I showed you how to do EXACTLY
last time you posted
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 7/1/2014 10:26 AM, Aziz Saleh wrote:
On Tue, Jul 1, 2014 at 10:02 AM, Jim Giner
wrote:
How about just showing us the section of code instead of disjoint pieces
that WE cannot be sure are applied correctly?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
On Tue, Jul 1, 2014 at 10:02 AM, Jim Giner
wrote:
> How about just showing us the section of code instead of disjoint pieces
> that WE cannot be sure are applied correctly?
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Also th
How about just showing us the section of code instead of disjoint pieces
that WE cannot be sure are applied correctly?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Ethan Rosenberg, PhD" wrote:
> What am I doing wrong??
Not checking the errors that mysql returns?
--
Cheers
David Robley
Tennis in the Bible: "Moses served in Pharaoh's court..."
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 14:12 21/03/2008, you wrote:
Message-ID: <[EMAIL PROTECTED]>
Date: Thu, 20 Mar 2008 11:05:22 -0500
From: "Dee Ayy" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: Query Across DBMS Boundari
Wow! I just found the Federated Storage Engine.
http://dev.mysql.com/tech-resources/articles/mysql-federated-storage.html
It's not in our SHOW ENGINES though.
I still welcome comments.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How would I know if this mySQL query:
DELETE FROM `table` WHERE `date_to_be_deleted` LIKE '$todays_date'
actually deleted any rows from the table?
www.php.net/mysql_affected_rows
Greetings,
Thomas Tschernich
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Ansering myself.
DB_DataObject http://pear.php.net/package/DB_DataObject/
On 2/25/07, js <[EMAIL PROTECTED]> wrote:
Hi list,
Is there any implementation of Query Object [1] written in PHP?
I spent some time searching on the net but no clues're found.
Thank you in advance.
[1] http://www.ma
pete M wrote:
I've got a database table with a whole list of "windows" file paths.
eg
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.ln
I believe the \ preceding the last % makes it a literal % not the wildcard %
"pete M" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've got a database table with a whole list of "windows" file paths.
>
> eg
> Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk
>
On Thu, 22 Jul 2004 05:59, Brock Jimmy D Contr 74 Mdss/Sgsi wrote:
> My query is returning duplicates rows.
>
> table: elements
> elementId
> standardId
> elementtext
> category
> mcode
> linenum
>
> table: scores
> scoreId
> taskId
> scores
>
> Here's my query:
> SELECT distinct elementtext,ca
For those that are curious, here's the working query:
SELECT options. * , count( option_items.optionID ) AS n
FROM options
LEFT JOIN option_links
USING ( optionID )
LEFT JOIN option_items ON options.optionID = option_items.optionID
WHERE option_links.productID = '$productID'
GROUP BY options.optio
Sorry, I'm wrong..
WHERE cannot refer to aggregate columns.. you must use the HAVING clause.
-Micah
On Wednesday 14 July 2004 12:07, Micah Stevens wrote:
> It is a column.. ;)
>
> And the docs say you can refer to an aliased aggregate column in the where
> clause:
>
> http://dev.mysql.com/do
It is a column.. ;)
And the docs say you can refer to an aliased aggregate column in the where
clause:
http://dev.mysql.com/doc/mysql/en/SELECT.html
I'll take this to the mysql list.. Thanks for your help..
-Micah
On Wednesday 14 July 2004 12:01, Torsten Roehr wrote:
> "Micah Stevens" <[EMAI
"Micah Stevens" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thank you Torsten ,
>
> They're backticks, and I get the same error after removing them.
>
> Any other ideas?
Then I guess you can't use num in your WHERE clause - MySQL thinks it's a
column.
Torsten
>
>
> -Micah
>
>
>
Thank you Torsten ,
They're backticks, and I get the same error after removing them.
Any other ideas?
-Micah
On Wednesday 14 July 2004 11:48, Torsten Roehr wrote:
> "Micah Stevens" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Hi,
> >
> > I'm getting an unknown colum `
"Micah Stevens" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I'm getting an unknown colum `num` in where clause error with this query:
>
> $options = mysql_query("select options.*,
> count(option_items.optionID) as `num`
> from options
> left join option_links using (
Oh, and I assume you left out the part of the query where you bound tables
routes and users?
-P
"Craig Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "SELECT * FROM routes, users WHERE area='$area' AND style='$style'
> BETWEEN rating='[$rating1]' AND rating='[$rating2]' GRO
I think you want:
"SELECT * FROM routes, users WHERE area='$area' AND style='$style'
AND rating BETWEEN '[$rating1]' AND '[$rating2]' GROUP BY route
ORDER BY rating ASC ";
>From http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html
"expr BETWEEN min AND max
If expr is greater than or equal
Is the primary key field numerical? If so then you can try to use an sql
statement like: SELECT MAX(field) AS max_field FROM table GROUP BY max_field
Chris
"Jimi Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
I'm trying to figure out how to write a MySQL query that w
Date: 8 Apr 2004 09:12:46 -
To: [EMAIL PROTECTED]
From: "David Robley" <[EMAIL PROTECTED]>
Subject: Re: Query Help!
Have you tried
SELECT `username` , `score` FROM round" .
($round_number -1) . " WHERE 1
ORDER BY `score` DESC LIMIT 0, 30
Ahh just tried it and relised what is going
Date: 8 Apr 2004 09:12:46 -
To: [EMAIL PROTECTED]
From: "David Robley" <[EMAIL PROTECTED]>
Subject: Re: Query Help!
[EMAIL PROTECTED] (Jerry) wrote in
news:[EMAIL PROTECTED]:
> Hi Everyone, Happy Easter to you all.
>
> I have this query, reasoning for posting on this
> Mailing List is
[EMAIL PROTECTED] (Jerry) wrote in
news:[EMAIL PROTECTED]:
> Hi Everyone, Happy Easter to you all.
>
> I have this query, reasoning for posting on this
> Mailing List is under it. :)
>
> SELECT `username` , `score` FROM round" .
> $round_number . " WHERE 1
> ORDER BY `score` DESC LIMIT 0, 30
>
You are selecting it as date but trying to echo DateOfOrder
Try this:
$TheDate = mysql_query("select DATE_FORMAT(DateOfOrder, '%d, %m, %Y') as
date from Orders Where Orders.ID = '$TransID'");
while($OrderDate = mysql_fetch_array($TheDate))
{
$Date = $OrderDate["date"];
}
-Original Message--
ery to prevent this?
For the DMC Left Join.. is should have returned: 2067 rows in set (1.63
sec)
ANY idea's?
Aaron
-Original Message-
From: Nelson Goforth [mailto:[EMAIL PROTECTED]
Sent: August 4, 2003 2:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] RE: query is returning over 74,0
Have you tried the MySQL EXPLAIN command to look at your statement?
That can provide some insight when nothing else works.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I wrote:
> For the C API see
> http://www.mysql.com/doc/en/mysql_affected_rows.html
> http://www.mysql.com/doc/en/mysql_num_rows.html
>
> The MySQL interface in every other language should have similar
> functions available ...
Ups, I _am_ in a PHP list/newgroup, so the more specific answer
i
Damir Dezeljin <[EMAIL PROTECTED]> wrote:
> I want to calculate how many rows my MySQL query [...] returns.
For the C API see
http://www.mysql.com/doc/en/mysql_affected_rows.html
http://www.mysql.com/doc/en/mysql_num_rows.html
The MySQL interface in every other language should have similar
f
echo the actual sql statement from runtime and post it.
"Natividad Castro" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi to all,
> I'm working in a system where users can post projects. Other users will
> verify those projects. What I'm trying to do is onc
"Chris Mackenzie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've been trying to solve this for hours now with no end in sight, I'm
> hoping that someone here might be able to help me.
>
> I've got four tables set out as shown below:
>
> tbl_student_details
Not sure if you received this previously. Try this query below.
Adam.
$query = mysql_query("SELECT * from 150bk where Signature like '%1' and
150bk.ID ='$rec_id' limit 1");
Hello,
Nomor Satu Bajingan wrote:
>
> Hello Friends,
> I've some performance problem, when I do sum() functions on my tables it
> took 5-7 minutes to return the results.. here is my story:
> I've table with 2461566 rows here is my table structure:
> mysql> describe imp_log;
> +--+---
It seems like what you're looking for is first to do a "SELECT DISTINCT
.." to find all the unique topic names in the system.
This, in your case, would present you with Billie, Bill, Bret, ... etc.
Then, in a loop as you traverse this result, create a query for the
count of each of these spe
dang, messed up the order of statements, sorry.
of course it must read:
select count(*) from posts where category = 'foobar' group by category
regards, mike.
--
mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com)
PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F CFB2 55D6 AA75
.: kno
select count(*), category from posts group by category
or
select count(*) from posts group by category where category = 'foobar'
should do the trick.
regards, mike.
--
mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com)
PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F CFB2 55D6 AA75
Steve:
I tried your method which is pretty much what I was trying already, but got the
following error
message:
MySQL Error Info
1064: You have an error in your SQL syntax near 'distinct(category)) AS total FROM
posts' at line 1
I am using MySQL 3.22.32 (Quite an oldish version - not sure if
select count(distinct(category)) as number_of_posts from posts;
should do it.
Steve
"Russ Michell" <[EMAIL PROTECTED]> wrote in message
news:SIMEON.10108211219.F@k1c. anglia.ac.uk...
> Hi there people:
>
> I have a MySQL table consisting of category names among other things.
> I would like to b
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Default) wrote:
> I'm using PHP 4 and mysql. I'm trying to do just a simple query from a
> database table, but every time it returns the value, it returns
> "Resource id #2" and results like that. Any ideas? Thanks.
This is correct. See the
Hi Alex,
mySQL doesn't return normal PHP values. You need to use mysql functions to
convert the mySQL resulting data into an array, like so:
// mySQL Table:
//
// field1 | field2 | stuff |
//
// Florida | Ferrari | George |
/
> "Jeff Oien" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I want to retrieve the last 15 days of data from a certain time but
> > not today's. I have this but it's still giving me today's data:
> >
> > $today = date("Y-m-d");
> > $sql = "SELECT volume, d
"Jeff Oien" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to retrieve the last 15 days of data from a certain time but
> not today's. I have this but it's still giving me today's data:
>
> $today = date("Y-m-d");
> $sql = "SELECT volume, date, time, id
Hi Hugh,
Hugh Bothwell wrote:
> "Mike Gifford" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>>The problem is that I am only getting one response from this query rather
>>
> than
>
>>5. I can't figure this out. What did I do to only get one response?
>
"Mike Gifford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The problem is that I am only getting one response from this query rather
than
> 5. I can't figure this out. What did I do to only get one response?
Try removing the ORDER BY and LIMIT and run th
44 matches
Mail list logo