Sorry, my typo, the else line should have read (note the missing brace)
return true;
} else {
alert(Passwords did not match);
Please note you need to turn on error reporting for scripts in IE or your
chosen browser - doing so would have told you the line which had
Hi Torsten,
until now,the best i could get was getting 6 random rows...still working on
ensuring to retrive just 2 rows for category...meanwhile,you can solve the
problem easily with a php loop trough the following query:
select field_id , language , category
from yourtable
where language =
Rui Cunha [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi Torsten,
until now,the best i could get was getting 6 random rows...still working
on
ensuring to retrive just 2 rows for category...meanwhile,you can solve the
problem easily with a php loop trough the following query:
Please can someone let me know their opinion on the following:
I have written some code for submitting a top 20 music chart online.
I use the following to insert into mysql:
INSERT INTO chart (name, chartpos, artist, title, label) VALUES
('$name', '1', '$artist', '$title', '$label'),
('$name',
Kenny - you will find there are no native PHP handlers for TIFF.
If you're on a unix system you'll be able to use the imagemagick function
'convert' at a command line to do this. Something like this I developed for
a client will work, you'll need to look up the passthru function in the PHP
Tom Chubb wrote:
Please can someone let me know their opinion on the following:
I have written some code for submitting a top 20 music chart online.
I use the following to insert into mysql:
your posting is offtopic - you can get more help by asking in the
mysql-mailinglist.
Regards,
Ruprecht
Tom,
For a start, this is off-topic, and you also cross-posted - please don't do so.
Have a look at this article:
http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html
I prefer simpler tables, so I would use the structure you have suggested,
with the possible addition of a
How do you accualty stor jpegs in a mysql db? And what's the pros and cons
of storing the whole image in the db and not just the path to the file on
the server?
It feels to me that it can be a bit difficult to organize the images if
they're just placed in a directory on the server. It would be
Bobo Wieland [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
How do you accualty stor jpegs in a mysql db? And what's the pros and cons
of storing the whole image in the db and not just the path to the file on
the server?
It feels to me that it can be a bit difficult to organize the
Howdy All,
If one were to use mysql_unbuffered_query() instead of mysql_query(), are
calls to mysql_free_result still needed? or valid? I'm asking because when
I make this change in one of my scripts, mysql_free_result throws a
warning: 'xxx' is not a valid result resource... The application
I have some procedural code that i'm wanting to convert into classes(and
i'm a bit greeen to OOP), hopefully to offer them to the PHP community. I
keep all my config data in arrays of arrays, which i'd like to keep when i
move to a class model, but can't seem to find out the correct defintion
On Wed, 30 Jun 2004 14:20:52 -0400, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I have some procedural code that i'm wanting to convert into classes(and
i'm a bit greeen to OOP), hopefully to offer them to the PHP community. I
keep all my config data in arrays of arrays, which i'd like to
Jeff,
From my recent readings, and others please correct me here, I think you
need to first declare the variables inside the Class, i.e., var
$srvr['etime'] = array();
var $srvr['etime']['server'];
-- then assign a value to them:
var $srvr['etime']['server'] = '27.22.1.5:1433';
In other
On Wed, 30 Jun 2004 14:20:52 -0400, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I have some procedural code that i'm wanting to convert into classes(and
i'm a bit greeen to OOP), hopefully to offer them to the PHP community.
I
keep all my config data in arrays of arrays, which i'd like to
I'm using php addslashes to store data into MySQL and php stripslashes when
pulling it back out, but I'm running into trouble when people enter HTML
code. Do you have any recommendations?
Here's an example of what I'm talking about:
input name=Title value=?php echo
I'm using php addslashes to store data into MySQL and php stripslashes
when
pulling it back out, but I'm running into trouble when people enter HTML
code. Do you have any recommendations?
Here's an example of what I'm talking about:
input name=Title value=?php echo
I'm not sure where the value of $counter is coming from, but it you're
getting it from a SQL SELECT query, it would be more efficient to just
use:
UPDATE statistics SET VALUE(`counter` = `counter`+1)
It's just one less query on the DB, which could make a difference if
you're getting heavy
Take a look at the php website on the function addslashes.
You will find an example with the functions reslash and reslash.
You might have some problems regarding magic_quotes.
Ive been using the reslash and deslash for some time now without
any problems.
It might solve your problems.
--
Kim
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 suggest to first analize the problem and then go through the query, php
coding ...etc etc
In the table u have only one superkey which is also a key and it is made of
the three fields (attributes) 'category', 'language' and ' name'. You should
consider to look for a prymary key randomly,
VERY brief class introduction...
class database {
function database() { // function with the same name as class is the
'constructor'
$this-srvr = array(); // once you declare an array once, no need to
declare 'sub' arrays
$this-srvr['etime']['server']= '27.22.1.5:1433';
Rinku's Response: I may be missing something, but hows that related?
The phpinfo() function generates a page that shows what is installed.
See if the configure string has --with-mysql or something like it. There
also should be a section called mysql. Take a look at
If I select rows with a limit clause I need to know if there are more
rows than the limit.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Bob Lockie wrote:
If I select rows with a limit clause I need to know if there are more
rows than the limit.
Either do a SELECT COUNT(*) prior to your LIMIT query to see how many
total rows there are, or use SQL_CALC_FOUND_ROWS and FOUND_ROWS() (more
info here:
Hi All,
I'm using $_session to store user name and status
and the session is used as key to access some pages
and I set the cookie variables like this :
setcookie (name,$user_name, $time+3600);
setcookie (status,$status, $time+3600);
and the authentication of the session variable like
Sukanto Kho wrote:
I'm using $_session to store user name and status
and the session is used as key to access some pages
and I set the cookie variables like this :
setcookie (name,$user_name, $time+3600);
setcookie (status,$status, $time+3600);
and the authentication of the session variable
I'm trying to set up a page that will take a search from a previous pages
form and make a query of a keywords table using that data. Eventually I will
try to do some more elaborate things like adding the ability to group
phrases together and use boolean searching, but for right now the
sorry, I was wrong ...
all the $session in my previous post should be $cookie... (I typed the wrong
word)
I think the domain is not the one that cause the problem...
remember that I refer to the same page (but sometimes success and the other
time it's fail)
What did u mean by unless you use the
Shiloh Madsen wrote:
say someone enters a search string of cat dog mouse rabbit (without the
qoutes) into my search box. What I need for the results page to do is to
construct a query that will search through my keywords table for every
instance of ANY of those words. How would you suggest I
Sukanto Kho wrote:
sorry, I was wrong ...
all the $session in my previous post should be $cookie... (I typed the wrong
word)
I think the domain is not the one that cause the problem...
remember that I refer to the same page (but sometimes success and the other
time it's fail)
What did u mean by
By Shiloh's description, I think you want to replace AND with OR -
using AND will only return rows that contains every word, while using
OR will match any row that has any of them.
On Wed, 30 Jun 2004 23:22:04 -0400, John W. Holmes
[EMAIL PROTECTED] wrote:
For that simple example, you can just
Hello,
I have form that a user updates, it contains 5 html select boxes. The
page loads and dynamically populates the select boxes with data from the
database.
Now the user can change any value of any select and hit Update now all
the changes are applied to the database to reflect that
Michael Gale wrote:
The question I have it .. on three of the select boxes .. if the data is
changed I require a extra function to get run.
So for example if the owner value is changed I want to send a e-mail
to the new owner.
For performance should I just pass a hidden value with the original
33 matches
Mail list logo