RE: [PHP-DB] Does PHP strip out the seconds from a SQL Server datetime field?. .

2005-12-06 Thread Norland, Martin
How are you printing/extracting this information? I find it very unlikely that it's returning that string - it would eliminate any localization opportunities as well as time conversion / math operations. Use print_r() to print the contents returned from SQL Server directly, if you're using

RE: [PHP-DB] Re: Need help with delete and modify functions on a form.

2005-10-18 Thread Norland, Martin
-Original Message- From: Arie Nugraha [mailto:[EMAIL PROTECTED] You can also use an array : form input type=checkbox name=check[] value=someValue1nbsp;Some Value 1 input type=checkbox name=check[] value=someValue2nbsp;Some Value 2 input type=checkbox name=check[]

RE: [PHP-DB] Limited connections to the database. .

2005-10-17 Thread Norland, Martin
http://www.google.com/search?q=oracle+limit+client+connections http://www.oracle.com/technology/pub/articles/php_experts/scaling_oracle _and_php.html Summary - either you're not using persistent connections, or your site is just very busy. If it's just that the site is busy, best you can do is

RE: [PHP-DB] Search Replace within PHP

2005-10-06 Thread Norland, Martin
I think he's looking for str_replace() / preg_replace() or sprintf() or similar http://www.php.net/str_replace http://www.php.net/preg_replace http://www.php.net/sprintf cheers, - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained

RE: [PHP-DB] Convert String to Array

2005-09-30 Thread Norland, Martin
Are you sure you even want to be storing it that way? What happens when you delete the following row? Do you have to re-index each column? There's no (trivially) easy way to do that with an update statement as it stands. vehMdlCd[1] LEX You're likely better off storing it simply as

RE: [PHP-DB] PHP Forms - upload VS text

2005-09-30 Thread Norland, Martin
form action=?php tpl($_SERVER['REQUEST_URI']) ? method=post enctype=multipart/form-data Beyond that it's just the $_FILES array and $_POST array. cheers, - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not

RE: [PHP-DB] PHP Forms - upload VS text

2005-09-30 Thread Norland, Martin
, September 30, 2005 10:26 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] PHP Forms - upload VS text. . Humm.. in the form action you use a function called tpl(); What function is that, I find no reference of it on the php.net function list. - Original Message - From: Norland, Martin

RE: [PHP-DB] what is the value of session_register

2005-09-22 Thread Norland, Martin
(top posted because the subject says it all) session_register -- Register one or more global variables with the current session It's pretty much deprecated in favor of the $_SESSION superglobal. It's recommended not to mix the two, and it functioning properly depends on register_globals being

RE: [PHP-DB] insert error for mysql

2005-09-19 Thread Norland, Martin
One of the strings you're inserting has an quotation mark (apostrophe). You're going to have to do some more careful data scrubbing on the incoming data. E.G. one of the strings says it's used in the retail, banking, and insurance industries, among ... And it's breaking the containing ' -

RE: [PHP-DB] Re: Inserting same text into HTML files. .

2005-09-13 Thread Norland, Martin
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en dir=ltr ... Not necessarily. cheers, - Martin Norland, Sys Admin / Database / Web Developer, International Outreach

RE: [PHP-DB] Help with

2005-08-31 Thread Norland, Martin
Don't mix mysql_ functions with mysqli_ functions, and you'll have much greater successes. $dbcon = mysql_connect( 'localhost', 'root', 'password', 'database_name' ); should be $dbcon = mysqli_connect( 'localhost', 'root', 'password', 'database_name' ); Cheers, - Martin Norland, Sys

RE: [PHP-DB] Re: HTML layout and arrays (WAS : Brain not working, helpneeded :-). .

2005-08-29 Thread Norland, Martin
-Original Message- From: Neil Smith [MVP, Digital media] [mailto:[EMAIL PROTECTED] The variable type you need is called an array, it has numerical indexes : In PHP you can just omit the index and it'll be automatically auto-incremented from zero, so there's no need to maintain a

RE: [PHP-DB] Brain not working, help needed :-). .

2005-08-29 Thread Norland, Martin
Figured I'd expand on what these evaluate to, in case anyone gets lost otherwise: -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] [snip] You can use variable variables.. like this: $num = 2 $num == 2 [obviously :) ] $varname = id.$num; $varname == id2 $$varname = id2

RE: [PHP-DB] Update multiple records

2005-01-10 Thread Norland, Martin
-Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 10:40 AM Subject: [PHP-DB] Update multiple records Having a problem here with updating multiple records in a table. [snip] Lets see - where to begin... SELECT * FROM `Profiles`

RE: [PHP-DB] Update multiple records

2005-01-10 Thread Norland, Martin
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 11:59 AM Subject: Re: [PHP-DB] Update multiple records [snip] This line in particular clearly warrants attention. Cookie to whoever guesses what the' problem` might 'be. that will be

RE: [PHP-DB] I'm trying to out perform Martin Norland....

2005-01-07 Thread Norland, Martin
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 3:26 PM Subject: [PHP-DB] I'm trying to out perform Martin Norland in terms of helpfulness and volume of replies to Q's on this list ;-) but it doesn't help that my mails seem

RE: [PHP-DB] Re: MySQL version issue

2005-01-06 Thread Norland, Martin
-Original Message- From: Doug Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 05, 2005 8:44 AM I isn't my intention to start a peeing contest, but if *you* get rid of the chip and actually read the manual excerpt, the equivalent SQL statements it cites are very

RE: [PHP-DB] php problem

2005-01-06 Thread Norland, Martin
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 7:13 AM Subject: Re: [PHP-DB] php problem if so then PHP is not either: 1. your webserver is not configured to use php to handle files with a php extension. 2. your webserver does

RE: [PHP-DB] str_replace question

2005-01-06 Thread Norland, Martin
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:34 AM Subject: Re: [PHP-DB] str_replace question [snip] A neat little trick would be to create the initial part of the statement with a predefined where clause based on some

RE: [PHP-DB] Stopping display of DB errors

2005-01-06 Thread Norland, Martin
-Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 11:36 AM Subject: [PHP-DB] Stopping display of DB errors When I run a query using Interbase and if an error occurs, the error displays in the browser window even though I am testing for

RE: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Norland, Martin
-Original Message- From: Andrew Kreps [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 12:30 PM Subject: Re: [PHP-DB] MySQL Auto PK On Wed, 05 Jan 2005 18:11:23 -0500, John Holmes [EMAIL PROTECTED] wrote: OOzy Pal wrote: Is it possible to have mysql at an ID as

RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Norland, Martin
-Original Message- From: Ford, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 1:13 PM Subject: RE: [PHP-DB] Trying to connext to MySQL with PEAR [snip] Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this one: Doesn't affect the answer, but this

RE: [PHP-DB] NULL VALUE

2005-01-03 Thread Norland, Martin
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:16 PM Subject: Re: [PHP-DB] NULL VALUE LightBulbMoment (tm): 5 seconds of searching on the MYSQL site tells me STATUS is a keyword. try either renaming your field or using backticks

RE: [PHP-DB] Parse errors ,,, can you. impart me about it.

2004-12-21 Thread Norland, Martin
-Original Message- From: amol patil [mailto:[EMAIL PROTECTED] Parse error: parse error, unexpected $ in /home/dollar1/public_html/signup.php3 on line 379 Parse error: parse error, unexpected $ in /home/dollar1/public_html/login.php3 on line 152 Parse error: parse error, unexpected

RE: [PHP-DB] HTTP Auth for PHPMyAdmin

2004-12-21 Thread Norland, Martin
-Original Message- From: Mark Benson [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 11:56 AM Subject: [PHP-DB] HTTP Auth for PHPMyAdmin What do i need to do to enable proper HTTP authorisation for PHPMyAdmin? I enabled it in the config file, but it rejects my attempts

RE: [PHP-DB] mysql to access

2004-12-17 Thread Norland, Martin
-Original Message- From: Perry, Matthew (Fire Marshal's Office) [mailto:[EMAIL PROTECTED] Does anyone know of a FREE program that exports MySQL to access? The trial versions of the ones I have downloaded do not export all the records of the database. If you can get a .csv export

RE: [PHP-DB] PHP, MySQL and phpMyAdmin versions...

2004-12-17 Thread Norland, Martin
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] huh? you can and should be able to upgrade to 4.0.x without too many problems. PHP 4.3.9 has no problems with that, nor will PHPMyAdmin. Moving to mySQL 4.1 will involve more pain as the protocols are vastly different

[PHP-DB] apparent mysql float behavior change from 4.0 to 4.1 (without any warning?)

2004-12-16 Thread Norland, Martin
I've got some strange mysql behavior, wondered if anyone encountered it. I have a database with some float(4,3) fields. I have a version of this running on mysql 4.0[.23], and another running on mysql 4.1[.7]. When I insert, for example, 12 into it - the 4.0 version stores '12.00' - but the 4.1

RE: [PHP-DB] Spot the deliberate mistake...

2004-12-16 Thread Norland, Martin
-Original Message- From: Mark Benson [mailto:[EMAIL PROTECTED] The following SQL statement returns an error. What is wrong with it? The error is stated as being near 'ON DUPLICATE KEY UPDATE foo_no='$data[1]', alt_no='$data[2]', descript='$data[3]', pr' INSERT INTO `foobar2` SET

RE: [PHP-DB] Spot the deliberate mistake...

2004-12-16 Thread Norland, Martin
-Original Message- From: Mark Benson [mailto:[EMAIL PROTECTED] If I try that it returns: You have an error in your SQL syntax near 'ON DUPLICATE KEY UPDATE' at line 1 so I guess something doesn't work there. I also tried it with and without the line ending and it didn't work either

RE: Re: [PHP-DB] Re: sessions

2004-12-13 Thread Norland, Martin
-Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] You are wrong. :) Having register_globals OFF helps to prevent poorly written programs from being vulnerable to users setting variables in the URL/header/cookie data. You can still write horribly insecure programs

RE: [PHP-DB] MySQL error...

2004-12-13 Thread Norland, Martin
-Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] No... That is just some strange error generated by the cut and paste. The IS NOT NU LL that is... The other issue with 'tablename'... I simply typed 'tablename' in the e-mail because I didn't

RE: [PHP-DB] versioning a database

2004-12-10 Thread Norland, Martin
-Original Message- From: Chris Wagner [mailto:[EMAIL PROTECTED] what i want to do is version a database. i am not sure if i am using the right word for this, but... [snip] * where, in the MySQL database could i store a version number? i know Tables have a comment field, which

RE: [PHP-DB] MySQL error...

2004-12-10 Thread Norland, Martin
-Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] I have been using a PHP page to update a database table for a long time now. Unfortunately, I have noticed that frequently when I perform an update I get back an error saying Table 'tablename' doesn't

RE: [PHP-DB] Insert db values into dropdown box error

2004-12-09 Thread Norland, Martin
-Original Message- From: Edward Dias [mailto:[EMAIL PROTECTED] while($row=mysql_fetch_array($result)({ echo option value=\$row[project_number]\$row[project_number]/option\n; } You have a backwards parenthesis. Try: while($row=mysql_fetch_array($result)) { Cheers, - Martin

RE: [PHP-DB] Splitting Arrays in Half

2004-12-09 Thread Norland, Martin
*** Your entire set of code is commented out. Fix that first and play with it. /* begins a comment, that doesn't end until a */ /* $total_count++; Should be // $total_count++; Or /* $total_count++; */ The same goes for $display_count++; later in your code.

RE: [PHP-DB] A language question

2004-12-08 Thread Norland, Martin
I agree with this wholesale, except one thing should be noted... If this content ever changes, and you need to be noting that, you'll need some way of tracking what's been retranslated and what hasn't. If it never changes - consider yourself lucky, but as someone who works with a translated app,

RE: [PHP-DB] Mozilla inserts twice, IE does OK... ?

2004-12-06 Thread Norland, Martin
Are you using view source a lot? (some of) Mozillas view source commands send the query again, minus the POST vars. This could be the behaviour you're seeing. I say some of because there are multiple ways of viewing the source - web developer toolbar's (extension) doesn't seem to suffer from

RE: [PHP-DB] php5 and mysql_connect

2004-12-06 Thread Norland, Martin
anyway mysql_connect() won't work in php5 - although I do believe it's possible to compile in the 'old' mysql lib yourself. No, PHP5 does indeed have some new (and different) functions for mysql, but it supports (properly, nothing old about it) the normal mysql functions as well. The change

RE: [PHP-DB] php5 and mysql_connect

2004-12-06 Thread Norland, Martin
AFAIK no version of PHP ever did compile with mysql by default. You *had* to use --with-mysql if you wanted mysql support. The choice was whether to use the bundled library (the default if you didn't specify a directory with --with-mysql) or some other library. snip If this is where you

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
-Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Here is what I tried: $to = $rsVendorJobs-Fields('Conmail'); $subject = $rsVendorJobs-Fields('RefEm'); $body = '$cl'; $headers = From: [EMAIL PROTECTED]; mail($to,$subject,$body,$headers); echo Mail sent to $to;

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
: [PHP-DB] stumped-mail and database --- Norland, Martin [EMAIL PROTECTED] wrote: 1) change $to = $rsVendorJobs-Fields('Conmail'); To $to = {$rsVendorJobs-Fields('Conmail')}; Or just $to = $rsVendorJobs-Fields('Conmail'); 2) change $body = '$cl'; To $body = $cl

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
All I can recommend from here is heavy use of printr() or var_dump() on your variables. $totalRows_rsVendorJobs = $rsVendorJobs-RecordCount(); // end Recordset This clearly means $rsVendorJobs is an object of some sort, probably some custom recordset object as you've said - so your best bet is

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
-Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] They are NULL. That is the problem. I can't for the life of me , figure out a way to initialize these variables. (Bear with me on this, because I've got nothing remaining to go on...) What do you get from:

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
var_dump($rsVendorJobs); object(kt_adorecordset_mysql)(33) { [dataProvider]= Looks like you're using the ADODB library ( http://www.certicamara.com/consulta/lib/adodb/docs-adodb.htm ) or similar. ( That may not be the official site, I just bounced around a bit. ) All your previous code

RE: [PHP-DB] Concat 3 fields in a query

2004-12-03 Thread Norland, Martin
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] '{$_POST['PO_Year']}-{$_POST['PO_Month']}-{$_POST['PO_Day']}' {$_POST['PO_Year']}-{$_POST['PO_Month']}-{$_POST['PO_Day']} Variables aren't evaluated in single quotes. - Martin Norland, Database / Web Developer,

RE: [PHP-DB] Concat 3 fields in a query

2004-12-03 Thread Norland, Martin
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] concat_ws('-',{$_POST['PO_Year']},{$_POST['PO_Month']},{$_POST['PO_Day'] }) I'm pretty sure this will error because of the unneccessary {}'s around the POST array items. PHP really doesn't like you using extra curlies

RE: [PHP-DB] Concat 3 fields in a query

2004-12-03 Thread Norland, Martin
http://www.php.net/manual/ http://www.php.net/manual/en/language.types.string.php Basically: * quoting with ' is when you just literally want that string output. You can't call functions or print variables values within it. e.g.print 'hello_world() $name';

RE: [PHP-DB] PHP-HTML-select deny

2004-12-01 Thread Norland, Martin
Hi, what can i do, where users can't select and copy my text from web-page. If you send text to the user, the user can always retrieve that text as just that. Whatever secret l33t code you're trying to protect, is just copied from some dhtml tutorial anyway. Whatever text on the page you

RE: [PHP-DB] Multi-User Update Problem

2004-11-29 Thread Norland, Martin
-Original Message- Does anyone know a good way of locking out access to a record on a MySQL database when someone has the update page open? The problem is that we have a local intranet site which is accessed by members of different departments. Now at the moment when someone loads the

RE: [PHP-DB] Excel - merging cells with PHP

2004-11-29 Thread Norland, Martin
-Original Message- When you export a table to excel, is there a way to merge cells and create borders? I want my excel file to look exactly like my html table looks. Matthew Perry I've not used it personally, but a route you may want to explore is PEARs Spreadsheet Excel Writer:

RE: [PHP-DB] amp; and sessions

2004-11-29 Thread Norland, Martin
Section 3.3 of that rfc indicates that ; is reserved in URLs - so I'm guessing there's another solution. Obviously you can wrap all your URLs up in a nice CDATA structure - but that seems ridiculous. A quick googling perusal confirms what I expected:

RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Norland, Martin
The real problem you're having is the statement says while there are results in this query, grab them - once you reach the end of the first while loop, there are no more results, so the second one is skipped right over - it's condition *never* evaluates true. If the query isn't changing, and

RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Norland, Martin
-Original Message- From: Mark Benson [mailto:[EMAIL PROTECTED] The real problem you're having is the statement says while there are results in this query, grab them - once you reach the end of the first while loop, there are no more results, so the second one is skipped right over -

RE: [PHP-DB] how to implement pages of results

2004-11-24 Thread Norland, Martin
Basic example: (handwritten in email client, syntax errors may exist) if (!isset($pagenum) || $pagenum 0) { $pagenum = 0; } $range = 30; $start = $range*$pagenum; $end = $start + $range; $limit = limit $start, $end; $query = select * from $table where host='$somename'$limit; Then just pass the

RE: [PHP-DB] how to implement pages of results

2004-11-24 Thread Norland, Martin
Correct - LIMIT 30,2 would show 2 records starting with the thirtieth. thirty-first. Sheesh, I should get outta here too - ^airhead^ - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St.

RE: [PHP-DB] I'm less experienced please be gentle :)

2004-11-18 Thread Norland, Martin
Remove the @ in front of the mysql_num_rows function call. The @ symbol supresses errors, so that's likely where your error would be printed. Cheers - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent

RE: [PHP-DB] odbc quest

2004-11-16 Thread Norland, Martin
$sql = SELECT * FROM users WHERE username='$username' AND password='$password'; $result = odbc_exec($dbConnection, $sql); while ($rows = odbc_fetch_array($result)) { //This doesn't work with odbc_fetch_object either print $rows-COLUMNNAME; } It's returning an array, not an object (I

RE: [PHP-DB] Numeric question

2004-11-16 Thread Norland, Martin
Just a quick question, I'm having to calculate some values from an existing database, but on some of the results I get (For example) 0.5907 How can I limit the result to only 2 digits after the decimal point with PHP? Thanks Chris Let the manual guide you: http://www.php.net/round

RE: [PHP-DB] Numeric question

2004-11-16 Thread Norland, Martin
I am fairly confident that in this particular case the opinion(s) contained within this email would nicely coincide with those of St. Jude Children's Research Hospital. We live in a world full of geometry. Ignatius Reilly ... Not to be outwitted ... I'm quite certain my statements in the

RE: [PHP-DB] PHP vs ASP

2004-11-15 Thread Norland, Martin
From: Perry, Matthew (Fire Marshal's Office) [mailto:[EMAIL PROTECTED] I need some ammo to convince my boss not to use ASP but use PHP instead. Anyone have some info I can give him? If you want us to give you live ammo instead of blanks, we'll need more details on your setup. There is a

RE: [PHP-DB] passing both an anchor and a variable

2004-11-12 Thread Norland, Martin
I have to admit, I've managed never to actually run into this - mostly because I almost never use anchors: http://www.faqts.com/knowledge_base/view.phtml/aid/317/fid/2 Counter-intuitively, it seems you have to toss the anchor at the end of the get string. This works in my brief testing - and

RE: [PHP-DB] how to find

2004-11-11 Thread Norland, Martin
I think (hope) that Rene was just trying to emphasize that while this is a php mailing list - it is focused on databases. An array full of 0's and 1's - while certainly data - hardly constitutes that. I suggest a 'for' loop using 'count()' of the array, or perhaps 'array_walk()'. Store the keys

RE: [PHP-DB] Re: Looking for more optimal way to do multiple similar inserts at

2004-11-11 Thread Norland, Martin
Please note that his solution uses a subselect - and your version of mysql may not support subselects. Subselects were introduced (I believe) in Mysql 4.1 - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily

RE: [PHP-DB] query of two tables returns too many rows, many more than the two tables contain

2004-11-11 Thread Norland, Martin
-Original Message- From: Chip Wiegand [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11, 2004 3:28 PM To: PHP DB Subject: [PHP-DB] query of two tables returns too many rows, many more than the two tables contain I have two tables I want to get out the rows that are different between

RE: [PHP-DB] session_destroy();

2004-11-09 Thread Norland, Martin
session_regenerate_id is what you're looking for http://us2.php.net/manual/en/function.session-regenerate-id.php Note that it keeps the session data, so you still need to session_destroy if you want to purge the data. - Martin Norland, Database / Web Developer, International Outreach x3257 The

RE: [PHP-DB] Question

2004-11-09 Thread Norland, Martin
Does your form tag have enctype=multipart/form-data ? e.g. form action=?php echo($_SERVER['REQUEST_URI']) ? method=post enctype=multipart/form-data - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent

RE: [PHP-DB] Forms list from database

2004-11-01 Thread Norland, Martin
Assuming, for the moment, that there's more code above that to actually support this... You want to be quoting the keys in the array, and containing each array 'lookup' in {}s: print $check[LNAME],$check[FNAME]($check[CID]); Should be print

RE: [PHP-DB] MySQL backup software

2004-10-27 Thread Norland, Martin
You were on the right track with mysqldump. Windows doesn't have a direct cron equivalent - but it does have the ability to schedule tasks. Write a short batch file or equivalent (you should be able to whip one together in no time with a little googling) and schedule it to run. I doubt you'll

RE: [PHP-DB] More help with restore server

2004-10-27 Thread Norland, Martin
Without thorough investigation, I can't be sure - but it looks like you have a packaged development version (e.g. cvs or for compiling libraries against) of php installed, and it's conflicting with allowing a non-development version. You would probably be best served by actually looking at the

RE: [PHP-DB] gdbm locking problem

2004-10-26 Thread Norland, Martin
The point is it was a simple test case created to test if locking was working, the results of which show that for whatever reason - it is not. The point wasn't to make a meaningful script. He's obviously trying to call a single script simultaneously, or work on a single database from multiple

RE: [PHP-DB] mysqli prepared statement query result sets

2004-10-26 Thread Norland, Martin
prepared statement query result sets Norland, Martin wrote: The functions you want exist in php5, if that's an option: http://us2.php.net/manual/en/ref.mysqli.php - http://us2.php.net/manual/en/function.mysqli-fetch-assoc.php No this is not an option. mysqli_fetch_* needs a result resource id

RE: [PHP-DB] gdbm locking problem

2004-10-25 Thread Norland, Martin
http://us2.php.net/manual/en/function.dba-open.php indicates (in an entertaining little table) your second script should be in 'wait' status until the first exits - so, the necessary logical questions (take no offense): 1) are both scripts repeatedly printing their results, or does the second not

RE: [PHP-DB] backing up database with mysqldump

2004-10-25 Thread Norland, Martin
If you're doing it interactively, you can just give it the -p flag and it will prompt you. Otherwise, I think the problem is you're overdoing it - the flag is either -p or --password= followed by your password, so -p mypass or --password=mypass. Also, I hope you meant you have been trying

RE: [PHP-DB] backing up database with mysqldump

2004-10-25 Thread Norland, Martin
Ah, good call. I'm too used to my database user matching my current user from unixland. (no, not root :P) - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research

RE: [PHP-DB] delete time related data inside a table within 1 hour

2004-10-25 Thread Norland, Martin
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html says that's the right format. Are you sure you're storing the time and not just the date? I'd wager that it will delete immediately if you are only storing the date. - Martin Norland, Database / Web Developer, International

RE: [PHP-DB] How to send a SID in a security way

2004-10-22 Thread Norland, Martin
I'm sorry - but performing a slight bastardization of Achems Razor is the best way to solve this dilemma. You have two web-based php applications that you have written yourself, and you have a single user (and browser) who wants to access those applications. The applications reside on the same

RE: [PHP-DB] imagecreatefromjpeg()

2004-10-22 Thread Norland, Martin
Check phpinfo() and see what options it was compiled with - at the very least you need gd support (--with-gd) and probably need to specify (--with-jpeg-dir) to point to jpeg libs. Aside from your configure line, you should be able to see from perusing whether the image functions are supported.

RE: [PHP-DB] Two session for the same user, possible?

2004-10-21 Thread Norland, Martin
There is only the one $_SESSION superglobal in PHP - and session_start doesn't take any parameters - so the builtin sessions in PHP undoubtedly aren't anticipating a need for this. If you are just trying to store more data - you shouldn't have a problem, just use $_SESSION as an array like

RE: [PHP-DB] making a query with env varable (but is not working)

2004-10-20 Thread Norland, Martin
Without knowing the actual value of $var, it's hard to say. Assuming the table 'frases' has the requisite fields (frases, palabras) and your sql is indeed returning any results (are you trying to match exactly, or do you mean to do palabras like '%$var%' instead of palabras='$var' ?) - the only

RE: [PHP-DB] Text corruption when storing to MySql

2004-10-20 Thread Norland, Martin
$content = str_replace($crap,$clean,$submitted_text); :) (I hadn't even noted you missed any at first) - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research

[PHP-DB] RFC on how to best submit a bug report

2004-10-18 Thread Norland, Martin
I'm posting to this list mainly because I'm not 100% sure that I have a bug (who ever is, right?). I'm doing an export of some relational data into XML, which amounts to many many queries in a database with the information basically being written straight out. Initially it was done using our own

RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Norland, Martin
A quick glance says that's all perfectly right, I would run the query on the mysql command line to be sure it's really giving more than 1 result - but I can suggest two things: 1) be sure to mysql_free_result($result) afterwards if you're done with the query but your script will still be

RE: [PHP-DB] Refreshing Problem

2004-10-18 Thread Norland, Martin
When the page refreshes, the data is reposted. You basically need to be able to track whether this is happening, or prevent it from easily happening. One easy solution is to send a header(Location: somewhere-safe.php) after a successful post. This way when the user hits refresh, it should just

RE: [PHP-DB] Showing all mysql query results!

2004-10-18 Thread Norland, Martin
to show them, im sure something on flash must be wrong or missing, there is no fault on the php code, so i might research a little more on the flash part. Do you know some good tutorial for this? Thanks for your response. Juan. --- Norland, Martin [EMAIL PROTECTED] escribió: A quick

RE: [PHP-DB] how many databases should I create

2004-10-18 Thread Norland, Martin
That all really depends on you. I would certainly say that, in general, any given database should only have one users table (with a separate table holding roles, permissions, etc.) In all likelihood - if all of these systems will be working together within a single company, and be built in a

RE: [PHP-DB] how many databases should I create

2004-10-18 Thread Norland, Martin
You're talking two different users here - in my instance, I was talking application users, not database users. Yes - realistically - you can use just the one database and have the user permissions for it, it's just a case of making sure you track everything right and don't access the database