Hi
Interesting problem! Systems would be so much easier to build if we didn't
have to allow for users :)
Two suggestions, depending on how you want the data dealt with.
A table of rows in use, with a time stamp and an owner. When user1 opens the
record, stamp it with owner and time. If user2
Thanks for that answer, you filled in some of the blanks for the table /
logging solution, but I am now looking at row locking instead of a seperate
table (and then doing things similar to what you outlined).
The main problem is the darn timeout - how long should it be etc? And if I
use row
Could some one please check the following code and guesstimate where am I
wrong ?
(the only thing I got from browser is: Fatal error: Call to undefined
function: fetchrow() pc_list.php on line 14, but on that line I have
fetchRow() not fetchrow(). To make it worse even when I am replacing
Forgot to post to the whole list! sorry
-Original Message-
From: matt stewart
Sent: 01 February 2002 09:22
To: 'Jose Maria Sala'
Subject: RE: [PHP-DB] renaming uploaded files
Hi Jose - this has a bit of error checking with it too.
this just uploads one file with the name 345.jpg
Hi
I don't think there can be a perfect solution, because you don't have a true
persistent session between the user and the system.
For the timeout watch a real user (or time yourself) and see how long it
takes to do the update. If locking user2 out for any length of time causes
problems go for
I just added phpMyAdmin to a new Apache Server, and I'm getting
this error:
cannot load MySQL extension,
please check PHP Configuration.
I did some research on the web, but couldn't come up with a
solution to this
error and couldn't find anyone listing it.
Does anyone know if this
I'm not sure why that isn't working, but this might do what you want:
$index = strrpos($im_file, \\);
$im = substr($im_file, $index + 1, strlen($im_file));
I just tested it out here and that works fine, $im = image.jpg
On February 1, 2002 02:41 am, you wrote:
Good day to all.
I tried the
Hi,
I am trying to get an array of fillingstocks to output in a bargraph.
(Program used for this is chartdirector
If I do the query and output it to the browser everything seems ok - if I
try to output the result via the graph it looks like if it's only using the
last result (I'm only getting a
okay, thanks for help ;-p
fetchrow failed because my query was buggy, the proper syntax for left is
LEFT(something, number)
Alecs [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Could some one please check the following code and guesstimate where am I
wrong
Hi,
I installed Apache, oracle client on windows 2000. When I use dl(php_oci8.dll)
function it gives the following error.
Warning: Unable to load dynamic library 'c:\php\extensions\php_oci8.dll' - The
specified module could not be found. in C:\htdocs\php.php on line 5
..but
The dl() function does not work on multi-threaded servers (ie Apache(win32)
and IIS). You'll have to add it in your php.ini file.
- Original Message -
From: aiQa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 01, 2002 3:20 AM
Subject: [PHP-DB] Oracle Dll
Hi,
I installed
Hi again,
When I include php_oracle.dll my .php pages hangs. IE world turns and turns around. No
error log is displayed. Do you have any idea?
Thanks,
aiQa
- Original Message -
From: Mike Maltese [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 01, 2002 1:35 PM
Subject:
Try using forward slashes for the extension directory. Run a phpinfo() page
and see if other extensions that you've loaded are showing up.
Mike
- Original Message -
From: aiQa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 01, 2002 3:49 AM
Subject: Re: [PHP-DB] Oracle
Oliver Cronk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Thanks for that answer, you filled in some of the blanks for the table /
logging solution, but I am now looking at row locking instead of a
seperate
table (and then doing things similar to what you
I have a loop process that reads a record out of a flat file, stores the
data for a given record in an array, writes the record to the db, resets the
data in the array, then iterates again thru the loop. Not every record has a
value for each field. For example,
Not every record has a value for
Hi guys,
I am trying to insert a NULL value into a DB field. The value is not always
NULL so the statement is given. Unfortunatelly it is inserting 0 instead of
NULL.
How can I get the thing going with NULL???
Here is the code I am using:
if ($park == 'false'){
$park = NULL;
}
$stmt =
Thats the most elegant and probably easiest to implement, now I just need to
figure out when to do a roll back I know the commands (COMMIT or ROLLBACK
just don't know how to put it in my transaction - is it something like
if(@@ERROR) ROLLBACK
As I have read the manual (both MSSQL and PHP) but I
Your problem is that you've included the value of $park in single-quotes.
Therefore, because it contains NULL, i.e., \0, this is translated to '0' in
the INSERT statement. You must make your test prior to the INSERT statement
and use the proper $park value.
Or, you can:
if ($park == 'false'){
Ah hang on just thought of a flaw in that - in between the second select,
compare and update is enough time for another user to slip in - so I will
still need some kind of logging.
But it brings me nearer the solution! I think the solution is a combination
of the 2 - start a transaction do a
Why not make it a function which also checks and replaces for characters SQL
fails on eg if ' replace with '' in strings etc, and does any sanity /
validation checks at the same time?
Ollie
Rick Emery [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
Your problem is that you've
Hi all,
I am relatively new to php and mysql and would appreciate any help you can
provide. Here is the task:
I need to have a point system added to my site. What I would like is when a
user logs in they will get 1000 points. But they only get it once per day.
I am running:
Xitami on WinME,
It's not failing on the single-quotes. MYSQL can use single-quotes.
-Original Message-
From: Oliver Cronk [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 10:01 AM
To: Php-Db ML; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Inserting NULL values does not work
Why not make it a
Like this for example:
http://www.phpbuilder.com/snippet/download.php?type=snippetid=378
-Original Message-
From: Oliver Cronk [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 16:01
To: Php-Db ML; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Inserting NULL values does not work
Why not
The real reason I'm asking is because I want to design a PHP app that uses a
similar framework to a current Java/JSP app I'm developing, and I will need
to use a controller php file that forwards the request and response objects
it receives to another php.
Java Servlets do this nicely because
Yes, that's the environment I'm coming from and am used to...
-L
Paul Dubois [EMAIL PROTECTED] wrote in message
news:p05101403b87e54724472@[192.168.1.31]...
At 12:30 -0600 1/30/02, Matthew Crouch wrote:
basically a yes or no question my brother wants me to ask:
Does PHP support these
I know its not failing on YOUR example but if there is a single quote in the
data eg someones name is O'leary then the SQL will fail surely?
Ollie
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 16:13
To: '[EMAIL PROTECTED]'; Php-Db ML
Subject: RE:
It won't fail if it is enclosed in double-quotes. That is:
INSERT INTO mytable (name) VALUES(O'leary)
is OK.
-Original Message-
From: Oliver Cronk [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 10:41 AM
To: Rick Emery; [EMAIL PROTECTED]; Php-Db ML
Subject: RE: [PHP-DB]
Correct your example as follows:
$sql = UPDATE $table_name SET new_area=\$new_area\;
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 26, 2002 10:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Update command syntax
Could anyone help me out with the
Off of MySQL.com:
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
SET col_name1=expr1, [col_name2=expr2, ...]
[WHERE where_definition]
[LIMIT #]
So a typical UPDATE command could be
UPDATE email_table SET email = '[EMAIL PROTECTED]' WHERE id =
'1';
For explanations of all args and options,
Yes, I did not receive any replies to that message yesterday. Here is my
code (condensed) as well. What ends up happening is that when I write a
variable for a field that did have data, for example cus034a, to the db it
shows a value of 0 when I intended it to be NULL.
Thanks.
Zach
# partial
yeah that sounds like apache not being setup right
Matt Williams [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I just added phpMyAdmin to a new Apache Server, and I'm getting
this error:
cannot load MySQL extension,
please check PHP Configuration.
I
Ollie,
First off, apologies, this is the first mention of MS-SQL (that I have noted). I am
not 'up' on the latest
versions/facilities offered.
Ah hang on just thought of a flaw in that - in between the second select,
compare and update is enough time for another user to slip in - so I will
right ok yes I see, but surely thats
$querystr = INSERT INTO mytable (name) VALUES(\O'leary\) otherwise the
query string gets truncated by PHP at the values point???
My point simply is that he IS using single quotes (see below) and would
therefore suffer from this problem (hence the reason for
Yes indeed I agree thats what I was trying to say (row lock between 2nd
select and update during which time a SQL comparision is made (as if its 2
queries (and PHP does the comparision in between) MSSQL will release the
locks i believe).
Thanks for your help and everyone else's, now I just need
sorry if this is painfully obvious but I can't seem to
figure it out...It seems to me (unless I am reading it
waay wrong) that the mysql DELETE command does NOT
allow you to refer to columns from other tables!
I have identified certain records to be deleted from 3
tables and created a temp
Weird..
I want to be able to edit records, which I have done in the past, and I
cannot see why it isn't working... I have tried single qoutes around the
$row = and that doesn't work either. here is the code:
$db = @mysql_select_db($db_name, $connection) or die(Could not select
database);
Did you print out the value of $sql before executing it? Was it as you
expected?
If so, did you print out mysql_num_rows() to verify it's greater than 0?
-Original Message-
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 2:52 PM
To: [EMAIL PROTECTED]
You cannot refer to other tables. Which row in temp would MYSQL know to
refer to test the WHERE clause? That is, if temp has multiple rows, which
row in temp would MYSQL check against to determine prod_id?
-Original Message-
From: Adv. Systems Design [mailto:[EMAIL PROTECTED]]
Sent:
Is your id an integer or a char/varchar? If it is an integer, take the
quotes off $id in your select statement.
Todd Williamsen [EMAIL PROTECTED] said:
Weird..
I want to be able to edit records, which I have done in the past, and I
cannot see why it isn't working... I have tried
I am assuming that this code is NOT the file do_mod_job.php.
What happens if you do this next line right after you execute your query?:
echo 'num rows fetched: '.mysql_num_rows($result).'br';
also, the while loop shouldn't really be necessary as the query should only
return one record if I
oops.forgot a semicolon on the first line of the multi-line code
segment
-Original Message-
$row = mysql_fetch_array($result)
echo 'tabletrthcolumn/ththvalue/th/tr';
while(list($key, $val) = each($row)) {
// $row has two key/value pairs per column -- one integer,
one
Read the MySQL documentation on DELETE. Multi-table deletes are a new
feature in 4.x; for the present it's one table at a time.
Cheers - Miles Thompson
At 02:44 PM 2/1/2002 -0800, Adv. Systems Design wrote:
Maybe my example attempt is misguided but the idea is
to look up the prod_id from temp
On 1/31/02 11:48 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
From: DL Neil [EMAIL PROTECTED]
Reply-To: DL Neil [EMAIL PROTECTED]
Date: Fri, 1 Feb 2002 16:28:16 -
To: Frank Flynn [EMAIL PROTECTED], [EMAIL PROTECTED], Garry Optland
[EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Date
Are you guys interested in yet another solution? It simular but I think
it's even easier if that's an incentive...
-In your table do put a datetime field, I'll call it lastMod. This will be
the last updated date and time (you need time here)
-In your form have this as a hidden field so it
Hi
Better to use an integer rather than a date field as 2 simultaneous
transactions can still occur on the same second; most date time fields
are accurate only to the nearest second.
Regards, John
Frank Flynn [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Are
45 matches
Mail list logo