information_schema database ...
select table_schema,table_name from information_schema.tables;
- Jon
On Oct 31, 2006, at 10:29 PM, Kurt Zimmerman wrote:
> Is there a system table you can quere to see if a
> table exists? I know there is one in SQL Server.
>
> Kurt
>
>
>
> _
Is there a system table you can quere to see if a
table exists? I know there is one in SQL Server.
Kurt
Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates
(http://voice.yahoo.com)
David Krings wrote:
> Dan Cech wrote:
>> What you're failing to consider here is the character set of the active
>> mysql connection. Correct me if I'm wrong, but it is my understanding
>> that mysql_real_escape_string does not incur an extra trip to the
>> database, the escaping still occurs with
Are you reassigning the result to $text? The first argument is not
passed by reference -- instead, it returns the trimmed string.
$text = rtrim($text, ', ');
echo $text;
BTW: if this string is build by a loop, there is another idiom that I
find cleaner than stripping off the last separator: B
Hi,
thank you so so so much!! I copied and pasted this and BAM! it
just works! I love it. Thank you very much indeed!
David K.
Ken Robinson wrote:
>
> What you want to do is use the "'" tag in your script. The "src"
> attribute should point to a script that will send the imag
Hi,
I have a string that looks like this
$text = 'blah, blah, blah, ';
I want to use rtrim to cut off the last comma and the whitespace. So I use
rtrim($text, ', ');
To my surprise, it doesn't cut anything off. When I echo $text the comma
and the space are still there.
Is rtrim broken or my logi
Dan Cech wrote:
> What you're failing to consider here is the character set of the active
> mysql connection. Correct me if I'm wrong, but it is my understanding
> that mysql_real_escape_string does not incur an extra trip to the
> database, the escaping still occurs within php, but it takes into
Bill Kamm wrote:
> Does this help?
>
> http://www.php.net/ob_start
>
> "This function will turn output buffering on. While output buffering is
> active no output is sent from the script (other than headers), instead
> the output is stored in an internal buffer."
>
> Bill
It generally does, but n
David Krings wrote:
> Hi,
>
> my guess is that some of the characters escaped using the mysql
> escaping cannot be reasonably expected to come in from user input.
> Mysql_real_escape_string escapes all these:
> \x00, \n, \r, \, ', " and \x1a
> but I can't think of any way on how to get \
This brings up an interesting point. Many people slam prepared
statements for being slow for non-repetitive querys. However, if you
need to make multiple trips to the database engine and back to escape a
handful of parameters, I wonder which method is actually faster --
especially if your DB is on
Hi,
my guess is that some of the characters escaped using the mysql
escaping cannot be reasonably expected to come in from user input.
Mysql_real_escape_string escapes all these:
\x00, \n, \r, \, ', " and \x1a
but I can't think of any way on how to get \x1a as user input
(assuming that
Hi,
from my experience, addslashes does the trick for the most part, but
mysql_real_escape_string is indeed the better one to use as it does
cover all possible (not only the likely) characters that could get MySQL
and its user in hot water.
From a practical viewpoint I'd just say both w
Hi,
I would use a session and write whatever I need somewhere else into
the session. As long as the session is kept alive you can grab from it
whatever you need. No GET, no POST, and definitely no JavaScript. ;-)
David K.
Jon Baer wrote:
> You need to be cool and do it the web 2.0
I just read the same thing in Cal's book and was going to ask the group
about this. While prepared statements sound nice in theory, there are
many of us that still hack together "old-fashioned" queries. And what
does "ultimately unnecessary" mean anyway? Consumes more mips than its
worth?
-Ori
Cool... I thought Chris might have something on this. The previous
chapter is all about unicode/utf-8 - why you should use it, how you make
sure that your input is valid utf-8, etc... so maybe he was making the
statement in that context where everything has already been converted to
valid utf-
Quoting csnyder <[EMAIL PROTECTED]>:
> You always need to escape each of the user submitted values in your
> SQL, in order to prevent breakage and security vulnerabilities. The
> mysql_real_escape_string() function is the recommended way to do this.
>
> function dbEsc( $value ) {
> return mysql_
> I'm currently reading "Building Scalable Web Sites" by Cal Henderson
> (which I think is great so far for anyone making large [or potentially
> large] web apps). In the section about avoiding sql injection attacks,
> he says "the more complicated mysql_real_escape_string escapes a bunch
> more c
Thanks, Rob!
That's exactly what I was looking for.
That should let me sail through my endeavour.
Thanks!
Paul
==
Rob Marscher wrote:
"if exists" is a sql thing. i.e. DROP TABLE tablename IF EXISTS; or CREATE TABLE tablename IF NOT EXISTS;Here's one way to check if your mysql table doesn't exi
So are their any real tangible advantages to mysql_real_escape_string as
opposed to addslashes?
-Brian
Rob Marscher wrote:
> A side note here about mysql_real_escape_string - curious if anyone is
> an expert on this... In that last year, I switched over from using
> addslashes to using mysql_
A side note here about mysql_real_escape_string - curious if anyone is
an expert on this... In that last year, I switched over from using
addslashes to using mysql_real_escape_string to escape strings in sql
statements because it's the 'right thing to do.'
I'm currently reading "Building Scala
At 03:18 PM 10/31/2006, csnyder wrote:
>I'm not sure what exif_thumbnail() would do with a non-image, but to
>protect against $_GET['f'] == "../../../etc/passwd" you'd probably
>better make that:
I said it was a quick example with no error checking. I would put a
check to make sure it's really an
On 10/31/06, Ken Robinson <[EMAIL PROTECTED]> wrote:
> Quick example (no error checking done...)
> Main script
>
> ?>
>
> tn.php:
> $image = exif_thumbnail($_GET['f'], $width, $height, $type);
> header('Content-type: '
> .image_type_to_mime_type($type));
> echo $image;
> ?>
On 10/31/06, Joshua Hart <[EMAIL PROTECTED]> wrote:
>
> While we're on the subject how about for something like an image upload (say
> 20 MB)? It would be nice to know how to give the user a "processing" page
> (perhaps even with a % done indicator)
>
> Joshua
Currently impossible with vanilla ph
On 10/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> [...]
> //Add new customer to database
> function AddNewCustomer($FirstName, $LastName, $Address,
> $City, $State, $ZipCode,
> $AreaCode, $Phone, $Email,
>
I think the scientific term is called "webinar" :-)
https://www.gotowebinar.com
http://www.campfirenow.com
Campfire is interesting in that you can post images/slides to the
group so it would be a quick hack (or something to model off of).
There was a nice piece of software a few years back tha
Hi Allen,
It really sounds like you are looking for an alternative (albeit
stripped down) version of webex. Some Googling brought this up:
http://dimdim.com/
Can't speak for it and can't even say I made it past the first page,
but from the description it sounds promising. And free.
Let us kno
At 02:02 PM 10/31/2006, Bill Kamm wrote:
Does this help?
http://www.php.net/ob_start
"This function will turn output buffering on. While output buffering
is
active no output is sent from the script (other than headers), instead
the output is stored in an internal buffer."
Bill
David Krings wro
Does this help?
http://www.php.net/ob_start
"This function will turn output buffering on. While output buffering is
active no output is sent from the script (other than headers), instead
the output is stored in an internal buffer."
Bill
David Krings wrote:
>Hi,
>
>I want to use exif_thum
Allen Shaw wrote:
Hi Chris,
Yes, I had seen S5 before and thought it a pretty nifty setup. But does
it allow the operator to control page-advance in real time? The idea is
that if you're having a meeting with one or more remote viewers, you
could discuss by phone while showing them one slid
Hi,
I want to use exif_thumbnail to extract the thumbnail of an image
and then have it displayed within a page. The page will have content
before and after the thumbnail, and the thumbnail may be present or not.
In order to have it show correctly, all manuals state to send the
content sett
I haven't heard of a free/OSS solution... but I agree it would be pretty
simple to do like you described. The viewers would have ajax code that
would periodically ask the server if the slide has been updated. The
server-side script could send back the html for the current slide and
the viewer
Hi Chris,
Yes, I had seen S5 before and thought it a pretty nifty setup. But does
it allow the operator to control page-advance in real time? The idea is
that if you're having a meeting with one or more remote viewers, you
could discuss by phone while showing them one slide at a time, at your
Hi All,
I'm looking for a free/OSS (preferably PHP-oriented) solution to this
problem: Deliver paged content (eg., typical still-frame slide show) to
any number of viewers via the web browser only, while providing only the
host/operator with the controls to advance the slides in real time; an
David Mintz wrote:
> This is the topic I always wondered about but was afraid to ask!
>
> True or false: You could accomplish this easily if you were doing the
> AJAX thing. Right? Look at the what-its, the readyState property and keep
> the "Please wait..." in your DIV (or whatever) element unti
On 10/31/06, Allen Shaw <[EMAIL PROTECTED]> wrote:
Hi All,I'm looking for a free/OSS (preferably PHP-oriented) solution to thisproblem: Deliver paged content (eg., typical still-frame slide show) toany number of viewers via the web browser only, while providing only the
host/operator with the cont
This is the topic I always wondered about but was afraid to ask!
True or false: You could accomplish this easily if you were doing the
AJAX thing. Right? Look at the what-its, the readyState property and keep
the "Please wait..." in your DIV (or whatever) element until your
readyState == 4
Of c
Looking at it from the user's perspective, the user enters some URL and
gets a page back with a form and a submit button. The user fills out the
form and clicks the submit button. The request comes in to you, and you
then respond to that request by sending the html I showed earlier. If
you have
You need to be cool and do it the web 2.0 way (slick effects
optional) ... :-)
Yes
- Jon
References
http://www.jquery.com
On Oct 30, 2006, at 11:25 PM, Ariel Kulkin wrote:
> Problem Statement: With the click of a button, I need to open a new
> window (to capture "user referrals"), a
"if exists" is a sql thing. i.e. DROP TABLE tablename IF EXISTS; or
CREATE TABLE tablename IF NOT EXISTS;
Here's one way to check if your mysql table doesn't exist with php:
if (mysql_query("DESCRIBE Customer_Info") === false)
{
// create the table
}
FYI, there's a nyphp-mysql list that my
While we're on the subject how about for something like an image upload (say
20 MB)? It would be nice to know how to give the user a "processing" page
(perhaps even with a % done indicator)
Joshua
On 10/31/06 10:42 AM, "Dell Sala" <[EMAIL PROTECTED]> wrote:
> Cute. And javascript free. :)
>
How is this triggered? Is this called by the requesting button/form? If so,
don't you lose the post/get variables?
On Tue, 31 Oct 2006 10:10:49 -0500, Bill Kamm wrote
> I use the following. It's simple, and it works. It displays the
> message "Please wait while we process your request", and immed
Cute. And javascript free. :)
However, there is a limitation to this kind of approach: It will only
work for requests that will return before your connection times out.
In many cases, this probably isn't a huge issue as the "slow" script
might only take about 30 seconds to run, or something
I use the following. It's simple, and it works. It displays the message
"Please wait while we process your request", and immediately redirects
to the url that does the actual work. The "processing" message will
remain on the user's browser until your other php script returns data.
http://your
Interesting. This seems like a great idea for uploads. But isn't the
"please wait, thinking" situation different. And how do you know when to
use "please wait, thinking," If Ticketmaster or Sabre knows it will take
30 seconds to process a request, that's one thing. But theoretically,
all requests a
If you don't need the initial server-side script to use the variable
until the form in the new window is submitted, you can also use
JavaScript to copy the variable from the old window into the new Window.
For example, you can copy it into a hidden input field.
-Original Message-
From: [EM
-- Forwarded message --
From: "Brian Dailey" <[EMAIL PROTECTED]>
To: "NYPHP Talk"
Date: Tue, 31 Oct 2006 06:08:13 -0500
Subject: Re: [nyphp-talk] Passing parameters with the click of a button.
Ariel,
Assuming user_id is a PHP variable, you should be able to do it like this.
46 matches
Mail list logo