On Sun, April 17, 2005 10:56 am, Dasmeet Singh said:
> I regularly need to insert data into MySQL.. and instead of writing
> Insert query everytime i wrote this function... and it works well..
>
> Please see and tell is it a good idea using this..or there might be
> problems with it?
It's not a Ba
On Mon, April 18, 2005 5:40 am, Bosky, Dave said:
> Would it be better to store uploaded pdf, word, or excel documents in a
> MySql blob field rather than keeping them in a directory?
>
> I really want to secure the documents and limit document access to
> specific users.
It shouldn't be significa
Andy Pieters wrote:
Hi
Whilst you are searching the net, you might also want to search for 'sql
injection'. This is no joke!
Please use the mysql_escape_string on each variable you get from the user
side.
Use mysql_real_escape_string() instead.
--
PHP General Mailing List (http://www.php.net/)
On Fri, 15 Apr 2005, Frank Miller wrote:
All,
I have a form which submits technical requests. It worked fine on an
old linux box using Mysql 3 series but recently we switched to windows
2003 server SP1 using Mysql 4.1.10. It was doing this before the
service pack. I get the form values and then in
Hi
Whilst you are searching the net, you might also want to search for 'sql
injection'. This is no joke!
Please use the mysql_escape_string on each variable you get from the user
side.
In your example
$Email = mysql_escape_string($_POST['Email']);
$Phonenumber = mysql_escape_string($_POST['P
Frank Miller wrote:
All,
I have a form which submits technical requests. It worked fine on an
old linux box using Mysql 3 series but recently we switched to windows
2003 server SP1 using Mysql 4.1.10. It was doing this before the
service pack. I get the form values and then insert them into a tab
On Thu, April 7, 2005 5:32 pm, Andras Kende said:
>
> I would like to do the following:
>
>
> mysql db:
>
> andrew
> anthony
> joe
> janice
> john
> simon
>
>
> sql_query ( select names .
>
>
>
> I would need only the distinct first character from the quer
On Monday 04 April 2005 18:45, Andy Pieters wrote:
> After the ?> must be NO character, not even a CR or LF
> Best way to check this is to put your cursor right next to the > and press
> the left key. If you r cursor moves then press left followed by del. Keep
> pressing the del key until all the
Hi Neo
Just some observations and hints.
I see you use the contents of a user variable ($_POST,$_GET,$_REQUEST,
$_SESSION) without check. Possibly you checked them on another page but you
shouldn't rely on that. You should take NOTHING for granted. You should
escape the input by using a funct
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 conne
> >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 ha
Hope I was helpful
Yaron Khazai
Thanks - will try that out soon.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
david joffrin wrote:
Hi,
I finally managed to run JBOSS/Tomcat with PHP, however, I am facing the
following error message when my PHP code is accessing MySQL: Fatal
error: Call to undefined function mysql_connect() in
C:\APPS\jboss-3.2.6\server\sudetp\deploy\jbossweb-tomcat50.sar\ROOT.war\regist
Tyler Replogle schrieb:
Can you update two tables in one mysql query
i've got these two queries
$db->query("update `dbn_members_counters` set views =(views +1) where
id = '$this->id' ");
$db->query("update `dbn_members` set lastaction = $conf->site_time,
page = '$this->page' where id = '$this->i
> Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL
> table?
Sort of, I think...
When MySQL is compiled, there is a buffer limit on how much crap you can
squirt through a single connection.
You can maybe alter this in my.cnf or be re-compiling MySQL.
If you are trying to
Alex Ortiz wrote:
Hello.
Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL
table?
no limit on php side, perhaps 2^31 if you do calculations.
I´m browsing a table with PHP from MySQL, and something is wrong, if the
table has more than 5047 records, the browse appears blank.
Jed R. Brubaker wrote:
Hi all -
I could use a lead on a problem. I just don't know where to start.
I have a PHP script that populates a database table. No big deal. It creates
mailing labels. However, a weird things keeps happening - every once in a
while, a query is run twice. It is the same que
Jed R. Brubaker wrote:
> I could use a lead on a problem. I just don't know where to start.
>
> I have a PHP script that populates a database table. No big deal. It
> creates
> mailing labels. However, a weird things keeps happening - every once in a
> while, a query is run twice. It is the same qu
Thanks for all the help, I managed to get it working, though I'm not
quite sure the reasoning behind it. I used some info I got off of
http://bugs.php.net/bug.php?id=29860 to do it.
I posted my particular resolution to the bug report. It seems to me that
*something* isn't right
Chris
--
PHP G
Richard Lynch wrote:
Here's the deal:
"configure" needs to find *BOTH* 'mysql.h' files and
'mysql.so'/'mysql.lib' files *UNDER* the directory you feed it.
Figure out where your mysql.h files are.
Figure out where your mysql.lib/mysql.so files are.
.
Thanks for the response, in fact I can't find
Chris wrote:
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr
--with-mysql-include-dir=/usr/include/mysql
--with-mysql-lib-dir=/usr/lib/mysql --with-mysqli=/usr/bin/mysql_config
it might work. I've managed to stave of the need for the mysql
extension for a week or two, but
Chris wrote:
> Hi, I've been trying to get these 2 compiled together for a while, and
> have had no luck.
>
> WHere my problem lies, I think, is that I'm not sure what directory
> should be specified on the --with-mysql part
Here's the deal:
"configure" needs to find *BOTH* 'mysql.h' files and
'm
Sebastian wrote:
> Hello,
> im working on an article system and looking to avoid running three
> queries.
> example, i have this query:
>
> SELECT id,title FROM articles WHERE id=$_GET[id]
>
> now say $_GET[id] = 5
>
> I would like to get the previous id 4 and the next id 6 (if there is one)
> so i
Chris wrote:
Hi, I've been trying to get these 2 compiled together for a while, and
have had no luck.
WHere my problem lies, I think, is that I'm not sure what directory
should be specified on the --with-mysql part
./configure --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/include/m
Hans Zaunere wrote:
Hi, I've been trying to get these 2 compiled together for a while, and
have had no luck.
WHere my problem lies, I think, is that I'm not sure what directory
should be specified on the --with-mysql part
./configure --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/include
dan wrote:
Chris wrote:
Hi, I've been trying to get these 2 compiled together for a while,
and have had no luck.
WHere my problem lies, I think, is that I'm not sure what directory
should be specified on the --with-mysql part
./configure --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/us
On Thu, 2005-02-17 at 22:02, Jason Petersen wrote:
> On 17 Feb 2005 19:28:18 -0600, Bret Hughes <[EMAIL PROTECTED]> wrote:
> > On Thu, 2005-02-17 at 18:24, Sebastian wrote:
> > > Hello,
> > > im working on an article system and looking to avoid running three
> > > queries.
> > > example, i have th
On 17 Feb 2005 19:28:18 -0600, Bret Hughes <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-02-17 at 18:24, Sebastian wrote:
> > Hello,
> > im working on an article system and looking to avoid running three queries.
> > example, i have this query:
> >
> > SELECT id,title FROM articles WHERE id=$_GET[id]
>
On Thu, 2005-02-17 at 18:24, Sebastian wrote:
> Hello,
> im working on an article system and looking to avoid running three queries.
> example, i have this query:
>
> SELECT id,title FROM articles WHERE id=$_GET[id]
>
> now say $_GET[id] = 5
>
> I would like to get the previous id 4 and the next
Now I am assuming that 4 and 6 would not always be the next article ID -
otherwise you could just increment your id accordingly.
If you wanted to do that without running multiple queries, this is who I
might do it, rather sloppy, but I think it would work.
$idGet= $_GET['id'];
$sql = "select id,
Sebastian wrote:
Hello,
im working on an article system and looking to avoid running three queries.
example, i have this query:
SELECT id,title FROM articles WHERE id=$_GET[id]
now say $_GET[id] = 5
I would like to get the previous id 4 and the next id 6 (if there is one)
so i can do something like
> Hi, I've been trying to get these 2 compiled together for a while, and
> have had no luck.
>
> WHere my problem lies, I think, is that I'm not sure what directory
> should be specified on the --with-mysql part
>
> ./configure --with-apxs2=/usr/local/apache/bin/apxs
> --with-mysql=/usr/include/
Chris wrote:
Hi, I've been trying to get these 2 compiled together for a while, and
have had no luck.
WHere my problem lies, I think, is that I'm not sure what directory
should be specified on the --with-mysql part
./configure --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/include/m
quoth the Jason Barnett:
> Darren Kirby wrote:
> > The problem is that after playing around with this a bit, it is clear
> > that someone can craft a url with an arbitrary $postid that is not in the
> > database yet. Now naively, it would seem that the worst someone could do
> > is just create arbi
C.F. Scheidecker Antunes wrote:
Hello all,
Does anyone upgraded from MySQL 4.0 to MySQL 4.1 using PHP 4 code?
If so, what are the changes that were required on the code?
PHP website says that it is required to install a new MySQL extension.
I am doing PHP4 programming under Linux.
What do you sugge
Darren Kirby wrote:
Hello all,
On the main page of my website I have written a very simple comments feature
that allows people to leave a message under my posts, much like a blog. I
have purposely kept this very simple...
On the main page I have simple text links that someone can click on if they
w
C.F. Scheidecker Antunes wrote:
Hello all,
Does anyone upgraded from MySQL 4.0 to MySQL 4.1 using PHP 4 code?
If so, what are the changes that were required on the code?
PHP website says that it is required to install a new MySQL extension.
http://www.php.net/mysqli
^<--- Th
Tom wrote:
...
It correctly updates 4 rows, but returns 1 as the count.
I think that this may actually be a mysql issue - I've put the same
php/apache configs onto another similar box, the only difference being
that the second box is mysql 5.0.1, whereas the problem is reported
against 5.0.0
Tom wrote:
> Richard Lynch wrote:
>
>>Tom wrote:
>>
>>
>>>I've just started playing with the php5 improved mysqli extensions.
>>>
>>>I have the following code:-
>>>
>$mysqlim = new mysqli("localhost", "myUser", "myPassword","myDB");
>>>
>>>$updateQuery = "UPDATE client SET status = 'INACTIVE' W
Richard Lynch wrote:
Tom wrote:
I've just started playing with the php5 improved mysqli extensions.
I have the following code:-
$updateQuery = "UPDATE client SET status = 'INACTIVE' WHERE clientName =
'Tom'";
if ($mysqli->query($updateQuery))
{
$updateCount = $mysqli->affected_rows;
echo
Tom wrote:
> I've just started playing with the php5 improved mysqli extensions.
>
> I have the following code:-
>
> $mysqlim = new mysqli("localhost", "myUser", "myPassword","myDB");
>
> $updateQuery = "UPDATE client SET status = 'INACTIVE' WHERE clientName =
> 'Tom'";
>
> if ($mysqli->query($upd
It depends on what you are trying to do. If you need full text
searching, MyISAM is what you should be using. If you are doing
transactions, InnoDB is what you probably want to use. If you write a
lot to the database, InnoDB may be better, if you read a lot MyISAM may
be better. But that depend
On Fri, 17 Dec 2004 09:57:56 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]>
wrote:
> Yeah, a beginner trying to write an OOP MySQL session based system would
> take MONTHS, and still get it all wrong with nasty snarled code.
Months? Come on.. it's just six functions and a call to
session_set_sa
Robert Cummings wrote:
> On Fri, 2004-12-17 at 11:34, Richard Lynch wrote:
>> Granted, this assumes you've got a good clean working SQL-based session
>> setup in the first place, which is several days, perhaps even weeks of
>> work for the beginner, before they really understand all the bits an
Jason Morehouse wrote:
> Has anyone had an experience with storing sessions in mysql (or sqlite)?
Yes, in MySQL.
> If so, what if any are the performance benefits?
This depends on *SO* many factors...
Is your MySQL database pretty small?
Is your site heavy traffic?
Are most of your sessions
On Fri, 2004-12-17 at 11:34, Richard Lynch wrote:
> Granted, this assumes you've got a good clean working SQL-based session
> setup in the first place, which is several days, perhaps even weeks of
> work for the beginner, before they really understand all the bits and
> pieces and ins and outs of t
Jason Morehouse wrote:
Hello all,
Has anyone had an experience with storing sessions in mysql (or
sqlite)? If so, what if any are the performance benefits? Obviously,
there would have to be an extra db query per page... but would that be
faster then opening a text file?
Speed depends on severa
Found the problem.
I set ( default_charset = "iso-8859-1" ) in php.ini and it solve the
problem.
Just in case anyone want to know.
"Jonathan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I have encounter something rather weird. In my development server,
>
> when I ins
John Nichel wrote:
Raditha Dissanayake wrote:
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
That does not mean mysql q
Raditha Dissanayake wrote:
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
That does not mean mysql questions should be
: [EMAIL PROTECTED]
Subject: Re: [PHP] MYSQL Query question
>Reinhart Viane wrote:
>And a last question:
>I always seem to get stuck on mysql queries when scripting. mysql.com
>gives me a headache whens earching something. Does someone know a good
>mysql manual site or a good mysql bo
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
That does not mean mysql questions should be posted on php mailing lists
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.
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, tr
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
http://www.radinks.com/up
> 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 h
Turmelle [mailto:[EMAIL PROTECTED]
>>Sent: zondag 28 november 2004 2:25
>>To: [EMAIL PROTECTED]
>>Cc: [EMAIL PROTECTED]
>>Subject: Re: [PHP] mysql query with exclude
>>Sounds like you need a join. Maybe something like:
>>
>>select * from chat c1,
>&g
id if(c1.user2_sessionid = $thisuser));
Can I do something like this?
>>-Original Message-
>>From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
>>Sent: zondag 28 november 2004 2:25
>>To: [EMAIL PROTECTED]
>>Cc: [EMAIL PROTECTED]
>>Subject: Re: [PHP] mysql q
Sounds like you need a join. Maybe something like:
select * from chat c1,
chat_online c2
where
UNIX_TIMESTAMP(c2.activity)=$limit_time and
c2.session_id = $thisuser and
((c1.user1_sessionid = $thisuser) or
c1.user2_sessionid = $thisuser));
You should enable php_mysql module in your php.ini file.
-- Manoj Kr. Sheoran
-Original Message-
From: Nathan Mealey [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 21, 2004 10:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Mysql Connect Help
A seemingly simple problem, still confound
Nathan Mealey wrote:
The following line of code:
mysql_connect('database','user','password'); [with values of course]
Generates the following error:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/phptest.php on line 3
My PHP info page says that PHP (4.3) was compiled wi
-- Original message --
From: Sam Smith <[EMAIL PROTECTED]>
>
> I've got it working writing out a file (fopen) to CSV (comma delimited) and
> the "header('Content-Disposition: attachment; filename="myFile.csv"')"
> method but it's clumsy for the user to figure out h
Octavian Rasnita wrote:
Please tell me how to send a null string to be inserted in a MySQL database.
If I do something like:
$string = null;
mysql_query("insert ignore into table(field) values($string)");
This will result in the following SQL query:
insert ignore into table(field) values()
If you o
> If I do something like:
>
> $string = null;
>
> mysql_query("insert ignore into table(field) values($string)");
>
> It gives me an error.
Pass a string value of 'NULL'.
Ie INSERT INTO table (field) VALUES (NULL);
Or, in your example:
$string = 'NULL';
mysql_query("INSERT INTO table (field)
On Mon, 2004-11-08 at 07:41, John Nichel wrote:
> Aalee wrote:
>
> > Hi guys,
> > I have a small home network working with just 4 computers (PC's on WinXP
> > Pro) connected through a switch just using the local ip's 192.168.0.1 and so
> > on. And the netwok is working fine. I have installed MySQL
Hi its a php mailing list ? Okey .
-- Manoj Kr. Sheoran
"Aalee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi guys,
> I have a small home network working with just 4 computers (PC's on WinXP
> Pro) connected through a switch just using the local ip's 192.168.0.1 and so
>
Aalee wrote:
Hi guys,
I have a small home network working with just 4 computers (PC's on WinXP
Pro) connected through a switch just using the local ip's 192.168.0.1 and so
on. And the netwok is working fine. I have installed MySQL on one computer
and setup a database and installed MySQL on the othe
* Thus wrote Kevin Grigorenko:
> "Zareef Ahmed" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > -Original Message-
> > From: Kevin Grigorenko [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 25, 2004 12:36 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] MySQL Scalabilit
hmed
-Original Message-
From: Zareef Ahmed [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 8:41 AM
To: 'Kevin Grigorenko'; [EMAIL PROTECTED]
Subject: RE: [PHP] MySQL Scalability, part 2
-Original Message-
From: Kevin Grigorenko [mailto:[EMAIL PROTECTED]
Sent: M
-Original Message-
From: Kevin Grigorenko [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 8:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL Scalability, part 2
"Zareef Ahmed" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> -Original
"Kevin Grigorenko" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Zareef Ahmed" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > -Original Message-
> > From: Kevin Grigorenko [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 25, 2004 12:36 AM
> > To: [EMAI
"Zareef Ahmed" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> -Original Message-
> From: Kevin Grigorenko [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 25, 2004 12:36 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] MySQL Scalability, part 2
>
> Hi,
>
> First, sorry for postin
-Original Message-
From: Kevin Grigorenko [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 12:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL Scalability, part 2
Hi,
First, sorry for posting an attachment. Second, I fixed my problem to
use
files, but I just had a general questi
* Thus wrote Nick Lane-Smith:
> Hello php-list,
>
> I'm curious to why default mysql support was dropped from PHP 5?
It was due to the changes in the mysql license. Due to the changes
the PHP Team decided not to enable mysql by default. MySQL had
modified there license but it was too late, the
* Thus wrote Kevin Grigorenko:
>
>
>
> begin 666 hitcounter.doc
Please dont post attatchments, put the file up on weberver instead
and just reference it here.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"John Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Kevin Grigorenko wrote:
>
> > Unfortunately, for some security
> > issues, I cannot get to the Apache statistics for the site, so I have to
> > create my own solution.
>
> I recommend you find a better host that gives you a
Kevin Grigorenko wrote:
Unfortunately, for some security
issues, I cannot get to the Apache statistics for the site, so I have to
create my own solution.
I recommend you find a better host that gives you access to the raw logs
and/or doesn't have safe_mode on.
--
---John Holmes...
Amazon Wishli
>
>
> When GO =< 1000 ), the links to PDF file are shown,
> and when GO > 1000, the links to PDF file are not shown (just brank
> cells).
>
> So probably I need to change this part.
> ?>.pdf">pdf
> But dont know how to do it.
>
> Please help me anybody, thank you!!
My syntax may look different
>
> .pdf">pdf
>
replace the above block with
.pdf">pdf
ganbatte!
ramil
http://ramil.sagum.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Nick Lane-Smith wrote:
Hello php-list,
I'm curious to why default mysql support was dropped from PHP 5?
The separation seems to have been done for license issues with the
mysql library.
PHP 4.X uses a libmysql with an abandoned copyright for mysql access.
Suffice to say it's pretty hard to find pe
[snip]
mysql> desc dates;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| the_date | date| YES | | NULL| |
| number | int(11) | | | 0 | |
+--
From: "Greg Donald" <[EMAIL PROTECTED]>
mysql> select the_date, count(number), avg(number) from dates group by
the_date;
++---+-+
| the_date | count(number) | avg(number) |
++---+-+
| 2004-01-01 | 3 | 2.
John Holmes wrote:
From: "Greg Donald" <[EMAIL PROTECTED]>
You can't get the average and a count in the same query
Sure you can.
mysql> select count(number), avg(number) from numbers;
Depends how you interpret his request, I guess. I took it as a request
for the count of records per day and then
On Thu, 16 Sep 2004 16:08:45 -0400, John Holmes
<[EMAIL PROTECTED]> wrote:
> Depends how you interpret his request, I guess. I took it as a request for
> the count of records per day and then the average of those counts.
>
> So, if you had
>
> D1
> D1
> D1
> D1
> D2
> D2
> D3
>
> The count would
From: "Greg Donald" <[EMAIL PROTECTED]>
You can't get the average and a count in the same query
Sure you can.
mysql> select count(number), avg(number) from numbers;
Depends how you interpret his request, I guess. I took it as a request for
the count of records per day and then the average of those
[snip]
> You can't get the average and a count in the same query
Sure you can.
mysql> select count(number), avg(number) from numbers;
+---+-+
| count(number) | avg(number) |
+---+-+
|18 | 2.3889 |
+---+-+
1 r
On Thu, 16 Sep 2004 15:15:01 -0400, John Holmes
<[EMAIL PROTECTED]> wrote:
> You can't get the average and a count in the same query
Sure you can.
> desc numbers;
++-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
++-+--+---
[snip]
I have a database with a date field in this format
20041016
I'd like to count how many records were made on each day (except today)
and average them. Can I do this in one query or will I need to do some
more PHP stuff after I get some results? Thanks.
Bare bones so far:
$sql = "select dat
From: "Jeff Oien" <[EMAIL PROTECTED]>
I have a database with a date field in this format
20041016
I'd like to count how many records were made on each day (except today)
and average them. Can I do this in one query or will I need to do some
more PHP stuff after I get some results? Thanks.
Bare b
Select date1,count(date1) group by date1 where date1 <> '$today'
That'll get you the count of how many records were done on each day
(excluding today). I don't know what you're trying to average, but you
can probably figure it out from there.
-TG
> -Original Message-
> From: Jeff Oien [
[snip]
I am looking for a absolute transparent interface to access each field a
s a object.
So if i would have a table like this:
tablename: namedtable
--
| id | foo | bar |
--
| 01 | aaa | uuu |
--
| 02 | bbb | mmm |
--
I could ac
From: "Neo Theone" <[EMAIL PROTECTED]>
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a part)
in PHP. I had one for Ruby but now I have to use a DB in MySQL and such
a class would make it alot easier.
Are you talking about
John Holmes wrote:
From: "Neo Theone" <[EMAIL PROTECTED]>
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a
part) in PHP. I had one for Ruby but now I have to use a DB in MySQL
and such a class would make it alot easier.
Ar
I do that a lot using Microsoft Access. I just finished on a project where I
had to eliminate duplicates from each of three or more queries, a couple of
which have three keys. However I am not much more experienced han you are;
Microsoft Access generates SQL for us so I am not sure what the SQL
From: "Neo Theone" <[EMAIL PROTECTED]>
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a part)
in PHP. I had one for Ruby but now I have to use a DB in MySQL and such a
class would make it alot easier.
Are you talking about
[snip]
I am searching for a MySQl to Object abstraction class.
I am thinking something like WebObjects does in Java (it is just a part)
in PHP. I had one for Ruby but now I have to use a DB in MySQL and such
a class would make it alot easier.
Does anybody know such a project or something similar
On Wed, 15 Sep 2004 21:51:40 +0200, Neo Theone <[EMAIL PROTECTED]> wrote:
> I am searching for a MySQl to Object abstraction class.
> I am thinking something like WebObjects does in Java (it is just a part)
> in PHP. I had one for Ruby but now I have to use a DB in MySQL and such
> a class would ma
[snip]
I'm looking for some examples of sites that are purely MySQL and PHP
running
on Unix and that contain a few thousand records preferably held in
relational databases.
Rationale:
I need to justify PHP as a tool of choice over say vb.net or Oracle. My
recommendation, despite my limited knowle
Robby Russell wrote:
Not to start a SQL war, but have you consider PostgreSQL as well in your
decisions?
And how about Firebird, Oracle has roots from the same original
development in the 1980's.
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing Li
601 - 700 of 1780 matches
Mail list logo