On Friday 10 January 2003 06:41, David Chamberlin wrote:
> > That may depend upon your particular circumstances, and hence running
> > your own tests on both methods would give you the best answer.
>
> OK, so what's the best way to go about profiling this?
Short answer: microtime()
Long answer: c
I forgot to mention there will likely be more than the one "file" that
relates to a task.
-Original Message-
From: Bruce Levick
Sent: Friday, January 10, 2003 2:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Relationship or not.
I have a bit of a challenge on and only being a newbie I wi
I have a bit of a challenge on and only being a newbie I will need to
call on some experienced PHP'ers.
I have two tables in a databse. "Tasks" and "Files". They relate to each
other via Tasks.ID and Files.FID.
I have successfully created an uploading form which adds images to a
directory and re
John W. Holmes wrote:
>>any hint on resetting a $res from mysql_fetch_row()?
> www.php.net/mysql_data_seek
Thanks, does help.
--
// Donny
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Hello everybody!!! I'm writing to you to ask if somebody knows how
can
> I do to emulate the examine button to retrive a file's path to save
that
> string in the database. Specifically, it's a photo, that've got to
search
> in the directory's window. Thanks in advance!
Yeah, you probably
Hello everybody!!! I'm writing to you to ask if somebody knows how can I do to
emulate the examine button to retrive a file's path to save that string in the
database. Specifically, it's a photo, that've got to search in the directory's window.
Thanks in advance!
Sabina Alejandra Schn
You're absolutely right.
It must be the 1.5 hours of sleep last night that made my brain shrivel
up like that. 8(
Doug
On Thu, 9 Jan 2003 17:45:00 -0500, John W. Holmes wrote:
>> ...
>> if ($result) {
>> while ($row...
>> ...
>> }
>>
>> $result will be 0 (false) if nothing satisfies t
Dave,
I am afraid I am not communicating what I am trying to do.
I have multiple databases that my library purchases. FirstSearch,
Ebscohost, etc. These company's have there own authentication systems that
I have no control over. A lot of them give user names and passwords that
can access t
Hi all,
I am currently building a site for a cinema to display session times, film synopsis'
etc...
I have built the database as follows:
TABLE: film_detail
FilmID
FilmName
FilmRunTime
FilmRating
FilmSynopsis
etc...
TABLE session_data
session_ID
session_filmID
session_StartTime
session_Date
> ...
> if ($result) {
> while ($row...
> ...
> }
>
> $result will be 0 (false) if nothing satisfies the query. Any other
> comparison is just extra typing with no improvement in logic.
No, it only returns false/0 if the query fails, meaning there was an
error and the query couldn't
Jason Wong wrote:
On Thursday 09 January 2003 08:36, David Chamberlin wrote:
I was reading the mysql docs and noticed a section on searching on
multiple keys (stupid question - keys=columns?). It says doing an OR on
multiple keys is inefficient, and you should use a temp table. Here's
their
> Hmm.. so it means that I should choose PG ???
That's not something we can answer as it very much depends
on your needs. Look at the features that PG has v. the features
that MySQL has and decide based on that. If you don't need the
functionality PG offers that MySQL doesn't, go with MySQL as
Hmm.. so it means that I should choose PG ???
#Please join Open Community Forum... http://openity.tk #We're free to
discuss anything
---DuFronte---
http://kapsul.org
No Fuckin' Shits !!
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Friday, Janua
Oh yeah.. I see... thx for the info...
#Please join Open Community Forum... http://openity.tk #We're free to
discuss anything
---DuFronte---
http://kapsul.org
No Fuckin' Shits !!
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10,
On Friday 10 January 2003 03:48, dufronte wrote:
> I want to start my Open-Source Project.. PHP-Based RPG Webgame in the
> next 2 months.. Till now, I still confuse in choosing 2 DBMS.
> MySQL and PostgreSQL. In your opinions, which DB should I use in
> consider that my Game will content a very bi
I want to start my Open-Source Project.. PHP-Based RPG Webgame in the
next 2 months.. Till now, I still confuse in choosing 2 DBMS.
MySQL and PostgreSQL. In your opinions, which DB should I use in
consider that my Game will content a very big database including Player
data, player Stats, Story and
I haven't looked over all your code in detail, but the problem you
describe seems to be best solved using PHP Sessions. Sessions store data
between browser refreshes. You could store whether a user has been
authenticated via LDAP, and then on a subsequent page, you can reference
that information to
Well what do ya know, this works! Thanks for the pointer.
if ($tableid=="newfaq") {
echo "adding FAQ";
$newfaq_query = "INSERT INTO `faq` (`faqid`, `question`, `answer`)
VALUES ('', '$question', '$answer')";
$newfaqResult = mysql_query($newfaq_query);
$newfaq_query2 = "IN
...
if ($result) {
while ($row...
...
}
$result will be 0 (false) if nothing satisfies the query. Any other
comparison is just extra typing with no improvement in logic.
Regards,
Doug
On Thu, 09 Jan 2003 13:06:51 -0500, Michael Cortes wrote:
>I am a programming novice
Nevermind. I just stumbled across the nature of my problem on
Deja.com. Thanks anyway and sorry for bugging you guys about what really
was a simple problem.
-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:36 PM
To: NIPP, S
it sounds like you are doing an INSERT and the table has fewer columns then
the VALUES clause has. Check your code for an INSERT statement then match
your values up with the table structure, check for hidden commas in your
value information.
Jim
---Original Message---
From: NIPP,
Post your SQL statement.
> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 1:37 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Stumped...
>
>
> I am getting an error that is proving very difficult to
> isolate and
>
I am getting an error that is proving very difficult to isolate and
was hoping for help. The error is: Column count doesn't match value count
at row 1. I would include the code, but it is about 350 lines, and I am not
sure where to narrow it down at. Any ideas? Thanks.
Scott Nipp
Phone
David,
I have ldap working, my problem is the second half of my question.
The problem script workflow:
1. Authenticate on LDAP (Resolved)
2. Connect to different authenticated site for the user (Not sure where to
go now.)
My guess was to send the post information to where the form action point
Oops! I missed again.
If you specify conditions pertaining to the right-hand table, such as:
ads_clickrate.date = '2001',
Then you will lose all result rows for which the right-hand data is NULL.
Not the expected result.
So your restricting WHERE clauses must apply to the left-hand table only.
On Friday 10 January 2003 01:04, Michael Knauf/Niles wrote:
> This Code Snippet works:
>
> $newfaq_query = "INSERT INTO `faq` (`faqid`, `question`, `answer`) VALUES
> ('', '$question', '$answer')";
> $newfeaturesResult = mysql_query($newfeatures_query);
>
> But I'd like to combine that query with
> I would like to created an if statement that only occurs if the query gets a result.
> If there are
> no records that meet the query conditionals and my array ends up with null, I do not
>want my if
> statement to take place.
> Is this easy enough to do? Any help would be great.
if( mysql_n
if (mysql_num_rows($result) < 1) {
//do stuff
}
This is only this easy with mySQL... :-)
<>< Ryan
-Original Message-
From: Michael Cortes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 11:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] If select query doesn't net any results
I am a programming novice and just created my first php application. However I have a
situation I
don't know the answer to.
My db queries (mysql) are written like this:
$qtrans= "select * from $table where (conditionals) order by some field";
$link=mysql_connect ($host, $user
Jeremy,
LDAP authentication happens in two stages: connect and bind. The connect
stage is just establishing a connection with the LDAP server
(ldap_connect()). No username or password is necesary in this stage.
Once your connection is established, you attempt a bind (ldap_bind())to
verify a userna
> Is there something i can do on browser refresh to prevent this or prevent my
> mysql database from duplicating the records?
Instead of using INSERT in your query use REPLACE INTO.
Alternately, after you are done processing the form, do this:
header( "location: $PHP_SELF?$QUERY_STRING" );
exit()
I use logic like this to avoid this problem:
Submit data from form to a separate PHP script that handles the database
submission then forwards to a results page which queries the database for
the information from an ID passed along with the page forward.
If you do this, when you refresh the resul
You want to look at nl2br() function.
It takes newlines from a text like:
Hello
My name is
Aaron
Which when outputted normally would look like:
Hello my name is aaron
Using echo nl2br($dbquery); would produce:
Hello
My name is
Aaron
In your HTML code which then would output in a browse lik
I have a page that has a form on the first part that posts to itself and
dumps the contents of the form into a database.
All this is well and good - I'm using
if ($_POST['submit']) {
}
to detect the submission and everything is doing as it should.
Thing is if you refresh the page that display
If you are using MySQL, you can't.
(none of my business, but why not simplifying your table names: "faqProduct"
instead of "faqRelatedToProduct" ?)
Ignatius
- Original Message -
From: "Michael Knauf/Niles" <[EMAIL PROTECTED]>
To: <[EMAIL PROTEC
I'm trying to place a text from a textfield into a database and displaying
it on another page. All works fine and well but my problem is:
If i place newline characters (press enter) in the forms textfield they
don't show up on my display page. This is logical because newlines are not
codes. So i
This Code Snippet works:
$newfaq_query = "INSERT INTO `faq` (`faqid`, `question`, `answer`) VALUES
('', '$question', '$answer')";
$newfeaturesResult = mysql_query($newfeatures_query);
But I'd like to combine that query with this one:
INSERT INTO `faqRelatedToProduct` (`id`, `fgNumber`, `faqId`)
I am working on a script that will authenticate on a central system my
company has devised for us to use (LDAP) and then authenticate them to
other sites that I want them to access (Online Databases and other
electronic resources I do not control but pay lots of money for all
students to access).
When I used to use perl to code, I ran into an issue where I would get an
error from the DBI module when i tried to insert more than 8000 characters
at one time.
I know php has it's own postgres functions, we use postgres, and I was
wondering if there where any limitations like that in php?
I kno
Not sure what's the question or the answer below... but anyway. To
protect your files, store them outside of the webroot or in the database
and use a PHP file to serve them up. The PHP file will check the
authentication or whatever of the user and if it's valid, serve up the
file to them with a pro
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com
This is fine and dandy, but how do I prevent that person from taking the
direct link to the file and giving it to someone else?
I'm sure there is a much bette
Thanks!
select * from offtime where type='%' didn't work but when I change = to
'like' it works great!
Thanks,
Eddie
-Original Message-
From: Marco Tabini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 4:57 PM
To: Edward Peloke
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] my
Oops! Sorry, I missed it the first time.
Your query should start as:
SELECT ads_displayrate.name
instead of
SELECT ads_clickrate.name
then you will always have a non-NULL name (coming from the table on the left
of the LEFT JOIN).
HTH
Ignatius, from Brussels
"Where the fuck is Belgium?"
D. Ivest
Exactly my question - why does it not have a name? How would I modify my
query to get a row with a name but null value for date? I thought the join
would take care of this, but I'm obviously not doing it right.
You mention a unique identifier, there is a separate table with a row for
each ad, c
Your 4th row ought to have an identifier of some sort. From your SELECT
statement, this seems to be the name. Why does it not have a name? Probably
what you want is a row with a name but a NULL value for ads_clickrate.date.
(by the way it is EXTREMELY advisable to use an abstract identifier, such
OK, this helped a bit. Now I have, in addition to the three rows of ads
that have ben clicked on, a fourth row with no ad name, 0 clickthroughs,
and 24 displays. That plus the other three account for all the displayed ads.
However, since it is returning a null value for any ad name that has not
problem 1:
move the WHERE clauses to the ON clauses
problem 2:
Obviously your intent with " COUNT(ads_clickrate.date) " is to count the
number of non-null occurences of click. But COUNT() is not the appropriate
function to do this (it will simply give you the number of rows inside a
group).
Try r
I have a page with many ads that stores both the number of times an ad is
displayed and how many times it gets clicked. These are stored in two
different tables (since different information is stored for each) but both
have identical name columns. I am trying to display both # times displayed
check
www.php.net and search for array... then you will get a list of all the
array functions
try to find it out yourself first please
-mark-
-Original Message-
From: khac duy [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 10 januari 2003 1:15
To: [EMAIL PROTECTED]
Subject: [PHP-DB] how use r
in php only support shuffe(); function,i want random a array,how
when using start_session
the code tries to write a file to the tmp dir...
think you are working under windows
so make in c: a \tmp dir !!!
then it should work
-Original Message-
From: khac duy [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 10 januari 2003 1:08
To: [EMAIL PROTECTED]
Subjec
Are you running on windows or Linux???
This looks like a Windows problem - you have to set your
"SESSION_SAVE_PATH" in php.ini AND make sure the folder you specify exists
and is accessible to PHP.
HTH,
Richy
==
Richard Black
Senior Developer, DataVisibil
Hello khac,
hmm what platform are you running on? what are PHP settings for
writing sessions? Check out permissions for /tmp directory, check out
free space on disk.
--
Best regards,
Martin mail [EMAIL PROTECTED]
mobile +421.907.30
i can't use start_secsion(); in php4, it say:
error : can't ofen(\tmp/4363jghsfjkhshga.. like this...
54 matches
Mail list logo