- Original Message -
From: Chris [EMAIL PROTECTED]
To: Ed [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 05, 2007 5:23 AM
Subject: Re: [PHP-DB] Multiple Count's in one Select.
[ please don't top-post, makes it hard to follow ]
Ed wrote:
As this is a new db i've
- Original Message -
From: OKi98 [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, January 05, 2007 1:19 PM
Subject: Re: [PHP-DB] Multiple Count's in one Select.
Ed wrote:
SELECT DISTINCT u.*, t.*, (SELECT COUNT(jobtype) FROM taskinput WHERE
t.user_id = u.user_id
it gives every user the same listings.
Surely there must be a more efficent way of doing this? but i've not been
able to find one that executes quickly.
Any help of stripping the code down too it's bare minimum and getting the
results quickly would be welcome :)
Thanks
Ed
--
PHP Database
'
It's got me stumped, but then i've not slept in nearly 24 hours.
Thanks for your help so far :-)
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Ed [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 05, 2007 5:03 AM
Subject: Re: [PHP-DB] Multiple Count's in one Select
2,300,000 how would i make it add to whats in the db already? same goes for
if he was sold and it went down to 1,700,000.
Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the user clicks update.
I'm going to build a function that will put the message in the correct table
using an if clause, is that the best method?
Ed
- Original Message -
From: Andrew Kreps [EMAIL PROTECTED]
To: Ed [EMAIL PROTECTED]; php-db@lists.php.net
Sent: Thursday, January 06, 2005 6:55
Hi,
The timestamp idea is an intresting idea and i'll give that method some
thought. I only want it to pull one private message at a time out of the
private message field so it might start getting very messy doing that
method - but it certainly does make it worth considering.
Ed
- Original
the
answer.
Ed
- Original Message -
From: Bastien Koert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 07, 2005 2:06 PM
Subject: Re: [PHP-DB] select text from a text file
simple, add a 'read flag' column to the table, when
Happy new year folks!
The titlemight make this seem like an easy to answer question
However here's the complicated bit (well for me anyway).
In my text file that is written to by the users in a chatroom it looks like
this:
nickname||color||what the user is saying||user
how can i make it so
Can anyone tell me whats wrong with the below code? it doesnt execute.
$ip=$_SERVER[REMOTE_ADDR];
$banned=SELECT * FROM banned WHERE ip='$ip';
if(@mysql_num_rows(mysql_query($banned)) 0) {
echo You have been Banned.;
}else{
echo $ip;
}
commands. They allow you
to filter misc. code that might be imbedded in the data and also prepare the
data for insertion into the database (if you're going to store it).
Ed Lazor, President
http://RPGStore.com
Up to 50% off. Over 20,000 items in stock
--
PHP Database Mailing List (http
select id, fname, lname, RAND() as temp from clients where featured=1 order
by temp
-Original Message-
I have the following query:
Select id, fname, lname from clients where featured=1 order by RAND()
At any time, there should only be three clients where featured =1.
Problem is
Hrm. Dunno then. I just manually tested it in MySQL and both approaches
worked. Are you able to test directly in MySQL? Might have to go to the
mysql list for this.
-Ed
-Original Message-
Yeah, I had tried that earlier but it doesn't work. It does generate
a new value for temp
.
This approach doesn't work well when dealing with large amounts of data. If
you're running into this, use javascript's window.opener feature. It allows
you to spawn a second window that retrieves data and sends it to the first
window.
-Ed
--
PHP Database Mailing List (http://www.php.net
The OOP Way
The World According To Linus
But. if I use addslashes and try to sort by Title, I end up with:
Drinking Beer The OOP Way
The World According To Linus
\'Pizza\' For Techies
Is there a way to account for this?
Thanks,
Ed
Use the more specific mysql_escape_string() (or friend) instead.
You're not supposed to use stripslashes() on data coming from the database
Kk, thanks Jason =)
-Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. Thanks for helping Mike. And thanks to Manuel and
Eduardo. I'll explore these options and go from there.
-Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Has any performance testing been done between ADOdb and PEARdb?
-Original Message-
PEARdb does seem to have caught up, but lots of third party applications
are already available that use ADOdb or have moved to it (or are moving)
in later updates.
--
PHP Database Mailing List
Quoting ioannes [EMAIL PROTECTED]:
The answer seems to be DATE_ADD but I haven't got it to work yet...asking
the MySQL people.
Check your version of MySQL... I think that's a newer function.
-Ed
This message was sent using
of the benefits of going with their service...
-Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
,
It is an excellent codeset, enabling you to use many features of excel
such
as colors, math, formats, etc.
doing it this way, is little to no different from exporting in csv format,
but it does work
as described.
HTH
Jeff
Wow, that's pretty interesting. I'll play around with it =)
-Ed
--
PHP
driver and use that to pull data directly into Excel.
That's what I do and the end result tends to be a lot cleaner than going
through cvs or other MySQL exports.
-Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-Original Message-
From: Daniel Brunner [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 17, 2004 2:45 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL to EXCEL?
I don't know how you have it setup.
But you can create a XLS file on the fly using PHP
By using header...
Is it just me or is this a very bad thing from a security standpoint? It
seems to me that user input should always be filtered before use. Otherwise
there's nothing stopping a hacker from embedding sql into the value of the
name variable.
-Original Message-
Insert into members (name)
-Original Message-
I don't have smtp server running on my computer. Any suggestions for smtp
server, please.
Those settings will depend entirely on your Internet Service Provider.
You'll need to call them and ask what you'd use for your outgoing SMTP
server for sending email.
-Ed
php.ini
; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 8:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Limiting persistant connections with
You're asking a legal question and should contact an attorney.
-Original Message-
From: Vincent Jordan [mailto:[EMAIL PROTECTED]
Sent: Monday, August 09, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Intellectual property rights
This is a bit off topic however it may be
with basic Virtual
Hosting without doing any sort of lock down. If you're not careful and
chose one of those providers, then you're definitely open to the sort of
security breach that you've described.
-Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
]);?
An error occurs if the entry has a value of:
this is a font color=redbtest/b/font. Are we having FUN yet?
Any ideas or recommendations?
Thanks,
-Ed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks everyone. I ended up using a combination of the htmlspecialchars and
the stripslashes commands. The htmlspecialchars function has an example
about halfway down that I ended up using.
Thanks =)
-Original Message-
Take a look at the php website on the function addslashes.
You
I submitted a question on Monday, September 01, 2003 2:45 PM, The title was
[PHP-DB] Novice needs help installing PHP on second computer and it
containd the following script with which i installed.
The script is a result of two or more months of trying to install linux,
mysql, php, and apache
displaying all the HTML code
generated.
Thanks
ed anderson
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
Thanks in advance
ed anderson
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ed Anderson
[EMAIL PROTECTED]
The notes I used for both computers follows:
#
# installed using root -
#apache package is in file:/usr/local/httpd-2.0.44.tar.gz
#php package is in file:/usr/local/php-4.3.0.tar.gz
# 1
2 output follows
tmtb_r_select_html_3.php
including class and function
1
2
end example 2
Thanks
ed anderson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
for a (class) to be developed.
Thanks again:
Ed anderson
htmlheadtitlesample.php/title/head
body
sample.php BR
see page 405 msql cookbook for code used to develop $h_nrows BR
?php
#
$mysql_connect = mysql_connect(localhost, root)
or die (mysql_connect $mysql_connect\n);
mysql_select_db
Dell 4500, mem 1g, disk 45g, mhz 2g, Mysql-3.23.54a-linux-i686, PHP-4.30,
httpd_2.0.44
1. How do I trap or collect or save the digit 3 generated the
mysql SELECT COUNT(*) statement below?
2. The PHP SELECT FROM below (before snip) listed the expected data.
Is there a way to get the
I am looking at a project using XML to import and export data into MySql
directly or using php. The datasets are quite large (40-50 million records)
XML is a metadata technology - you wrap data in XML. You don't use XML to import or
export data. You don't store XML in a
database, you store
On the other hand, proclaimed native XML databases (eg, Software AG's
Tamino, Ixiasoft's TEXTML) store the XML-wrapped data in the database...no
need to wrap and unwrap the metadata, document/data structure from the data.
Isn't that more than a bit stupid? Databases are for storing data, not
Not sure there is much more metadata in an XML database than in a data
database.
In a standard database, the data and metadata are stored separately, not so with XML.
When the next new latest and greatest thing
comes along, you'll have to strip all that metadata out of your data. It also
Naw do your parsing in PHP..try to lessen the load on the DB server any
way you can...
ed
At 09:11 AM 5/30/2002 +0800, Beau Lebens wrote:
A cleaner option might be to do this before you get it to PHP at all, via
your SQL query.
Check out the string functions available, there are a number
You need to parse the string and PHP and generate the appropriate query
based on that parsing...
ed
At 09:22 PM 5/29/2002 -0700, Chris Payne wrote:
Hi there everyone,
How can I do a search which excludes certain words if they put a - in the
search string? I can do a search easily
Well put Julie
ed
At 10:39 AM 5/30/2002 -0700, Julie Meloni wrote:
Jas (and anyone else) -
With all due respect, you're acting like a troll. Posting a question,
getting MANY correct answers, then reposting the question and bitching
about not understanding the answers, well, that's troll
People use to suppress errors / warning messagesI know I use it a lot
with obdc and SQL SERVER procedures...
ed
At 02:32 PM 5/30/2002 -0400, Leotta, Natalie (NCI/IMS) wrote:
From what I've seen on the PHP.net site, it doesn't look like people use the
@ in @mysql_query, and I know that I
In php.ini you need to turn register_globals on..you also might want to
start using the $_GET, $_POST, $_SESSION global arrays
ed
At 02:49 PM 5/29/2002 +0100, Rob Fraser wrote:
Dear All,
I am probably doing something silly but I don't know what (story of my
life). I have just upgraded
use:
$name=Mouse Housing Products;
$name=str_replace(Products,,$name);
also the RTFM() function works too
ed
At 11:06 AM 5/29/2002 -0500, Jen Swofford wrote:
I'm having a problem with this and suppose I'm looking for a handout. :|
I am displaying names of product categories. The names
? That might generate that error).
But if you need that section array later, we can try a different approach..
ed
At 07:15 AM 5/28/2002 -0600, Jas wrote:
Hello all,
I have an error and I will be darned if I know why. Here is the code:
?php
require '/path/to/database/connection/class/db.php
try just:
$sql = INSERT INTO $table_name (f_name,l_name,email_addy,un,pw) VALUES
('$f_name','$l_name','$email_addy','$un', 'PASSWORD('$pw')';
ed
At 09:55 AM 5/28/2002 -0600, Jas wrote:
I am trying to add an insert into a table and set one of the fields to a
password hash, however I am
I am looking for a front end for mysql for use on my website. What I want
is something that I can run, from the server (my webhost will not allow
remote connections to the mysql server), that allows me to insert, delete,
and modify records into a mySql database. Requirements are that it be
49 matches
Mail list logo