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";
}
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 th
t time 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]>;
S
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
- Ori
7;t seem to find the
answer.
Ed
- Original Message -
From: "Bastien Koert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc:
Sent: Friday, January 07, 2005 2:06 PM
Subject: Re: [PHP-DB] select text from a text file
> simple, add a
he'd then have
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
ser_id
from each SELECT COUNT it goes through in less than a second in fact but
doesnt display the results properly 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 stri
get any kind of result where adding the extra WHERE
t.user_id = u.user_id AND t.jobtype = 'Tickets'
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
- Original Message -
From: "Chris" <[EMAIL PROTECTED]>
To: "Ed" <[EMAIL PROTECTED]>
Cc:
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 wro
- Original Message -
From: "OKi98" <[EMAIL PROTECTED]>
To:
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
has a value of:
this is a test. 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.
> Y
tuations where hosting providers set accounts up 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 Lis
Hold refers to the period of time when a student is waiting to be matched
with a host family.
- You have three groups: students, coordinators, and host families.
- Coordinators match students with host families.
- Students go through different stages of processing.
The goals are to:
- provide e
Check out the ini_set command in PHP. It'll let you set this option from
within your specific script.
> -Original Message-
> I am running a script (called through a browser) that checks entries in a
> table one at a time. As the table has grown, the script takes longer to
> run
> than is
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 m
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 wit
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
te
and grab their ODBC 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 h
t
> spreadsheetwrite_excel,
> 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
>
as one
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
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 (htt
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
I keep looking at the following code and thinking there's gotta be a better
way. I've been in front of the computer all day tho and I'm drawing a
blank. Any ideas?
Thanks,
-Ed
$sql = "select ID from products where ";
if ($webpage->parameter_isset(&quo
checked the
archives first - my bad. 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
x27; For Techies
Drinking Beer 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
to load all data into javascript
arrays. In other words, you don't have to reload the page, because all of
the data is already present.
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
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.
> Prob
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
>
eck out the strip_tags and mysql_escape_string 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
--
umn
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:
>require '/path/to/database
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
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
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. :|
>
>
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,
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
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 a
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, a
> 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 dat
> 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
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
free
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
a pattern for a (class) to be developed.
Thanks again:
Ed anderson
sample.php
sample.php
see page 405 "msql cookbook" for code used to develop $h_nrows
"; $tn = "";
$r = ""; $rn = "";
#
$h_query = " SELECT *
FROM employees
WHERE id
;
#$tmtb_db = connect_tbc_db();
#echo " 3 ";
## define_variables
include ("./inc/tmr/dat_tmr_variables.inc");
include ("./inc/html/html_variables.inc");
#
echo " 4 .";
?>
#
tmtb_r_select_html_3.php end
submit
http://127.0.0.1/tmtb_r_select_html_3.php
example 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
ttp://127.0.0.1/php_test.php";.
Any hints, help, or documentation would be appreciated.
Thanks
Ed Anderson
[EMAIL PROTECTED]
The notes I used for both computers follows:
#
# installed using root -
#apache package is in file
oblem.
Thanks in advance
ed anderson
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
end of job 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
web page does what I want.
Again, Thanks
ed anderson
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 apach
53 matches
Mail list logo