Re: [PHP-DB] Target window.

2001-01-29 Thread Beau Lebens
ww.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Ma

[PHP-DB] Streaming a file from DB over SSL using IE

2001-01-30 Thread Beau Lebens
could possibly think of (a couple really dodgy work-arounds remain..) to no avail. Currently my system works for every browser under the sun (including lynx surprisingly!) except i cannot download any of the files saved in the database on an IE client. Thanks Beau -- Beau Lebens - Web Master

Re: [PHP-DB] Streaming a file from DB over SSL using IE

2001-01-30 Thread Beau Lebens
with data embedded in the PHP program? Will test that ASAP and post the results. -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED

Re: [PHP-DB] Help Me!

2001-01-31 Thread Beau Lebens
at http://www.hotmail.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly

Re: [PHP-DB] assoc arrays

2001-02-20 Thread Beau Lebens
? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker

Re: [PHP-DB] advice

2001-02-20 Thread Beau Lebens
] Email: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online

Re: [PHP-DB] Primary Key Value

2001-02-27 Thread Beau Lebens
a separate select query against the table? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way

Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Beau Lebens
You could then issue as select statement like " select * from articles limit 7 order by nArticleKey descending" (maybe it should be "top" instead of "limit", check your MySLQ syntax) and feed those to the front page. select * from articles order by nArticleKey desc limit 7 although a better

Re: [PHP-DB] Drop down box

2001-03-01 Thread Beau Lebens
tors, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP-DB] Insert a file in a mysql database!

2001-03-05 Thread Beau Lebens
: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

RE: [PHP-DB] Scheduling php task

2001-03-05 Thread Beau Lebens
To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: [PHP-DB] Import

2001-03-07 Thread Beau Lebens
dministrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insuran

Re: [PHP-DB] alphabetical order

2001-03-07 Thread Beau Lebens
IL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: [PHP-DB] php-mySQL and an SQL query

2001-03-08 Thread Beau Lebens
[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php

Re: [PHP-DB] PHP Include

2001-03-21 Thread Beau Lebens
ands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-ma

RE: [PHP-DB] How can this be done?

2001-04-27 Thread Beau Lebens
you need to use the addslashes() command which will escape the quote mark for you, so something like $query=insert into trivia (trivia) values (' . addslashes($line) . '); however, you will find that on a machine which is configured with magic_quotes_gpc turned on, you will end up with

RE: [PHP-DB] problem with functin newbie please help

2001-04-29 Thread Beau Lebens
also, on line 11 you use a variable called $localhost, i think you mean $hostname, which has the value localhost :) that won't help since it will pass a null value and mysql_connect will bork at having too few parameters. and you need to assign your mysql connection to a variable, so that you

RE: [PHP-DB] Updating Mysql database from a remote computer

2001-04-30 Thread Beau Lebens
if the computer where the writable copy of the database is stored is permanently connected to the other one, then you could just create a new user for that database using mysqls security features which only has access to read information, no change or delete. and yes you can connect using an ip,

RE: [PHP-DB] Your Internet Education!

2001-05-06 Thread Beau Lebens
something tells me that people on a php database mailing list already know a little about computers and the internet... dick // -Original Message- // From: Noel Hadfield [mailto:[EMAIL PROTECTED]] // Sent: Monday, 7 May 2001 10:54 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Your

RE: [PHP-DB] sessions and page refresh?

2001-05-06 Thread Beau Lebens
if you just want to refresh same page, then there shouldn't really be a need, if you just do something like ?php header(Expires: 0); // Don't cache this page, so always load clean header(Cache-Control: no-cache); // as above if (

RE: [PHP-DB] session.save_path

2001-05-09 Thread Beau Lebens
if you are using c: (win32 box) it should actually be c:\\ :) HTH Beau // -Original Message- // From: Philippe Saladin [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 9 May 2001 4:55 PM // To: [EMAIL PROTECTED] // Subject: Re: [PHP-DB] session.save_path // // // save_path = c://temp

RE: [PHP-DB] INSERT statement

2001-05-21 Thread Beau Lebens
try INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z' quote marks around the $z and make sure you are doing it as query( "INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z'" ); or whatever, using " marks properly :) HTH Beau // -Original

RE: [PHP-DB] PHP-Javascript

2001-05-23 Thread Beau Lebens
you are trying to use a php header to redirect... there is no need, just do it via javscript, and keep your variables where they belong :) script language=javascript var id; uid = prompt(Enter your ID,Your ID); document.location.href = 'ndex.php?uid=' + uid; /script easy :) // -Original

RE: [PHP-DB] concatenation

2001-06-21 Thread Beau Lebens
$mailto_link = mailto:; . $result[email_address]; // -Original Message- // From: DanielW [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 21 June 2001 1:06 PM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] concatenation // // // Greetings. // // Can anyone tell me how to concatenate

RE: [PHP-DB] MySQL Error???

2001-06-28 Thread Beau Lebens
sounds like your field definition is something like int(2) or something, it needs to be bigger so that it can handle higher numbers for the unique primary key :) // -Original Message- // From: Brian Grayless [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 28 June 2001 12:24 AM // To: PHP

RE: [PHP-DB] Adobc error

2001-06-28 Thread Beau Lebens
Wilmar, it means that a file which is included via the require() function cannot be found. usually this is because they are doing something like require( $ROOT . /the/file/they/want.php); and you haven't set $ROOT properly, or something like that. basically, search registro.php for require and

RE: [PHP-DB] Showing an image

2001-07-02 Thread Beau Lebens
what you should actually do is save that script as something like image.php and then on the page where you want to have text + images, do something like html body img src=image.php?uid=xxx border=0br I am some text under the image that is grabbed from the DB /body /html assuming that the

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
Sagil, the way I do something like this is write a script using PHP that does exactly what you want, without any input or anything like that, then just set up cron to run that script every 2 hours. you can use either lynx to hit it as a webpage, or it's an admin script or something that you don't

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
! beau // -Original Message- // From: PHPFAN [mailto:[EMAIL PROTECTED]] // Sent: Friday, 6 July 2001 10:20 AM // To: [EMAIL PROTECTED] // Subject: Re: [PHP-DB] Newbie:Backend scripts // // // Hello Beau Lebens, // // Thank you very much for the advice. // I am using windows 2000/NT.So do

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
// OK, i just checked and tested (jeez i'm a nice guy.. :P) and // dodgy Windoze // schedule doesn't allow you to do it by the hour, so if you // want it every 2 // hours, you'll have to set one, daily at 2am, one daily at // 4am etc etc, all // doing the same thing. change this, under the

RE: [PHP-DB] Re: setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Beau Lebens
one hour after the cookie is set, the session won't expire as such until either 1. the user closes their browser and destroys temporary cookies (not the case if you set expiry time) 2. the expiry time is reached 3. you determine from some other method (i.e. a different variable is set to fale or

RE: [PHP-DB] parsing checkbox array without [] and selecting all boxes

2001-07-09 Thread Beau Lebens
don't your checkboxes act like radio buttons when you check them if they all have the same name? i would do something like form name=mail_boxes action= method= ?php // How ever many checkboxes you want $number_of_checkboxes = 5; for ( $this_check = 0; $this_check $number_of_checkboxes;

RE: [PHP-DB] RE: Row order

2001-07-11 Thread Beau Lebens
If you created each column name on the table (i assume that's how this is working) and then as rita said, dump the searched variables as hidden inputs, then you could have something like this happen; form name=reorder action=?php echo $PHP_SELF ? method=POST input type=hidden name=first_var

RE: [PHP-DB] Left Join is producing duplicate results - MySQL relational tables

2001-07-11 Thread Beau Lebens
altho this may not help at all, rather than bashing away with php+SQL statements, i usually just pilot my sql in phpmyadmin, then once it works with set values (ie SELECT * FROM people WHERE personID='3' rahter than personID='$personID' or something) i can then drop that SQL into my script. HTH

RE: [PHP-DB] Escaping

2001-07-12 Thread Beau Lebens
dynamic link, i think he means something like echo a href=\customer_details.php?customer=$customer\Customer/a\n; or whatever, and as for making it so that you can include a in the $customer variable in the example above, try this; echo a href=\customer_details.php?customer= .

RE: [PHP-DB] PHP Mysql apache economy hosting

2001-07-13 Thread Beau Lebens
i am using phpwebhosting.com, which is only 9.95US per month, so far they have been really good. have PHP4, MYSQL (one table with account, extras by request) 150mb storage, but this is unmonitored, PO3 email account, subdomains etc etc - take a look at their site :) // -Original

RE: [PHP-DB] PHP Mysql apache economy hosting

2001-07-16 Thread Beau Lebens
of their connection :) // -Original Message- // From: Roger Ramirez [mailto:[EMAIL PROTECTED]] // Sent: Friday, 13 July 2001 7:08 PM // To: Beau Lebens; PHP DB Mailing List // Subject: Re: [PHP-DB] PHP Mysql apache economy hosting // // // How long have you been using phpwebhosting.com? They sound

[PHP-DB] Lame ODBC Query Engine?

2001-07-16 Thread Beau Lebens
guys and gals, as sad as i am to admit it, i am in the process of converting a php project into ASP. this means i am using an dobc connection to connect to the exact same database as i was using under php (it's a mysql database, so using the myodbc driver on win2k machine) and i am having some

RE: [PHP-DB] config php w/ mysql

2001-07-23 Thread Beau Lebens
also, make sure you have selected a db to work on onece connected to the mysql server mysql_select_db or something like that beau // -Original Message- // From: leo g. divinagracia iii [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 24 July 2001 12:21 PM // Cc: [EMAIL PROTECTED] //

RE: [PHP-DB] phpmyadmin troubles - creating tables

2001-07-24 Thread Beau Lebens
you need INT(16) or something, as in in phpmyadmin, enter an integer for the size of the field as well when defining it :) // -Original Message- // From: olinux [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 24 July 2001 2:08 PM // To: php-db // Subject: [PHP-DB] phpmyadmin troubles -

RE: [PHP-DB] report style printing

2001-07-26 Thread Beau Lebens
i am also a tad confused. i have produced numerous reports in differing formats from PHP and a mysql database, using things such as many figures to calculate hours/dollar value for work in a timesheet format, text-based comment reports and simple archive reports for student details, these were

RE: [PHP-DB] MSSQL: Spaces in database name

2001-08-08 Thread Beau Lebens
i noticed in teh sql of working with some apps that it does things like [Test Database].fieldname that might work :) HTH Beau // -Original Message- // From: Robert D. Young [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 8 August 2001 2:39 PM // To: '[EMAIL PROTECTED]' // Subject:

RE: [PHP-DB] Error checking and escaping before running a query (MySQL)

2001-08-08 Thread Beau Lebens
Dave, sounds like you are on the right track, but rather than use the comparatively bulky regular expression engine, why not just the light-weight string function str_replace( ,, , $searchbox ); (see String Functions in the manual) and you should be able to do str_replace( \, , $searchbox

RE: [PHP-DB] Inseting info into MySQL and retrieving all in one SQL command

2001-08-08 Thread Beau Lebens
not so much in one step, but once you have inserted it you can call the function mysql_insert_id(); and it will return the auto_increment value of the last insert operation. see the manual for more. HTH Beau // -Original Message- // From: Scott Mebberson [mailto:[EMAIL PROTECTED]] //

RE: [PHP-DB] semi newbie Q

2001-08-08 Thread Beau Lebens
no it can't directly, but there are plenty of mail classes out there which will allow you to handle mime-types, attachments and other stuff. have a look on phpbuilder.com and phpclass.something? cant remember, run by a guy called manuel lemos if that helps... search for mail, and you should find

RE: [PHP-DB] semi newbie Q

2001-08-08 Thread Beau Lebens
but i cant // get this one to go away. Any suggestions? // // Thanks // // T P K Cannell // // Beau Lebens [EMAIL PROTECTED] wrote in message // [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... // no it can't directly, but there are plenty of mail classes // out there which // will a

RE: [PHP-DB] variables

2001-08-22 Thread Beau Lebens
if there is a value in $HTTP_POST_VARS[variable_name] then it came via a form with method=POST, if there's a value in $HTTP_GET_VARS[variable_name] then it came from querystring or a form with method=GET beau // -Original Message- // From: J-E-N [mailto:[EMAIL PROTECTED]] // Sent:

[PHP-DB] SELECT giving too much :)

2001-08-29 Thread Beau Lebens
National Key Centre for School Science and Mathematics Science and Mathematics Education Centre Curtin University of Technology, GPO Box U1987 Perth, Western Australia 6845 t: +61 8 9266 7297 (has voice-mail) f: +61 8 9266-2503 (ATT: Beau Lebens) e: [EMAIL PROTECTED] w: http://learnt.smec.curtin.edu.au

RE: [PHP-DB] SELECT giving too much :)

2001-08-29 Thread Beau Lebens
locations table? // // You might want to try yanking locations out of the join // since you're not // using it in your WHERE clause or showing any info from it. // // Doug // // At 12:06 PM 8/30/01 +0800, Beau Lebens wrote: // Hi guys, I have a set-up to query a database by allowing // the user

RE: [PHP-DB] PHP+Postgresql/Win32

2001-08-30 Thread Beau Lebens
i have never tried this myself, but i think you might have to load the postgres module in php separately there is a line like ;extension=php_pgsql.dll or something in you php.ini file, remove the ; (comment) to enable it, and restart apache HTH beau // -Original Message- // From:

RE: [PHP-DB] Newbie Help: Searching

2001-09-05 Thread Beau Lebens
have a form with something like input type=text name=TechContact value= then submit it to a page that might do something like $Query = SELECT * FROM enet WHERE TechContact LIKE '%$TechContact%' AND AdminContact LIKE '%'; which will locate anything CONTAINING what the user enters in the text

RE: [PHP-DB] Backups, best practices

2001-09-07 Thread Beau Lebens
// you can get command line zip/compression packages for // windows, although // for // *some* reason, as far as i know, not a command line // version of winzip - // the // big one! // // err.. please correct me if I'm wrong, but isn't pkzip // exactly that? or more // exactly, winzip is a

RE: [PHP-DB] USA Attacks

2001-09-11 Thread Beau Lebens
As another Aussie watching in silent disbelief last night as the live media showed me the second plane crashing into the WTC, and someone with family in the US (although thank god nowhere near the recent occurrences) I'd also like to say hang in there and be cool if that's possible, I'm sure

RE: [PHP-DB] Individual Lines of text

2001-09-24 Thread Beau Lebens
or you can fopen() the text file, then fgetcsv() each line, using , as a separator, which is just a neat, clean way of doing explodes :) enjoy beau // -Original Message- // From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 25 September 2001 8:27 AM // To: [EMAIL

RE: [PHP-DB] Multiple lines in database.

2001-09-24 Thread Beau Lebens
print the results using nl2br($stuff) which converts new lines (nl) to (2) breaks (br) in html (br) // -Original Message- // From: Chris Soyars [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 25 September 2001 10:04 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Multiple lines in

RE: [PHP-DB] HTML or PHP?

2001-10-02 Thread Beau Lebens
not that this has *anything* to do with databases, but try the nowrap directive in the td containing the URL, i don't think it will work, otherwise you will need to use something like the PHP function wordwrap() enjoy /beau // -Original Message- // From: Jason Caldwell [mailto:[EMAIL

RE: [PHP-DB] Storing HTML in database

2001-10-02 Thread Beau Lebens
try using the htmlspecialchars() function instead - works for me :) // -Original Message- // From: Nally, Tyler G. [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 3 October 2001 6:29 AM // To: '[EMAIL PROTECTED]' // Subject: [PHP-DB] Storing HTML in database // // // Hello, // // I'm

[PHP-DB] Oracle 9i?

2001-10-05 Thread Beau Lebens
Australia 6845 t: +61 8 9266-7297 (has voice-mail) f: +61 8 9266-2503 (ATT: Beau Lebens) e: [EMAIL PROTECTED] w: http://learnt.smec.curtin.edu.au/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

RE: [PHP-DB] Sorting a 2 dimension array

2001-10-05 Thread Beau Lebens
although i've never used it, sounds like you would need to use the uasort() function, and write a custom comparison function - tho don't ask me how to do that :P HTH Beau // -Original Message- // From: John Clarke [mailto:[EMAIL PROTECTED]] // Sent: Friday, 5 October 2001 4:01 PM //

[PHP-DB] HTTP User Authentication...

2001-10-21 Thread Beau Lebens
and Mathematics Education Centre Curtin University of Technology, GPO Box U1987 Perth, Western Australia 6845 t: +61 8 9266-7297 (has voice-mail) f: +61 8 9266-2503 (ATT: Beau Lebens) e: [EMAIL PROTECTED] w: http://learnt.smec.curtin.edu.au/ -- PHP Database Mailing List (http://www.php.net

RE: [PHP-DB] https

2001-10-22 Thread Beau Lebens
you mean to use for some sort of header redirect or something? couldn't you do 1. click link change to secure mode 2. pass the url you just came from with the link (or get it from HTTP_REFERRER or whatever it is) 3. header(Location: . str_replace(http://;, https://;, $last_url)); or am i

RE: [PHP-DB] Capturing select values from a multliple-select list box

2001-10-22 Thread Beau Lebens
i *think* you can do something like select name=county[] and then it will pass an array on submission (someone please correct if wrong!) failing that, you could use a javascript:onChange() function to set the value of a hidden field using something like (snippet from previous project) function

RE: [PHP-DB] Re: Newbie in Need of Assistance

2001-10-24 Thread Beau Lebens
carols - true, but to avoid confusion and problem sif your names get more complex (i.e. i think $$some_name will go crazy, you should always do it like this $var_name = game1; ${$var_name} cheers guys // -Original Message- // From: Carlos Augusto Abarca [mailto:[EMAIL PROTECTED]] //

RE: [PHP-DB] HELP! (mysql)

2001-10-25 Thread Beau Lebens
if you have phpMyAdmin then just use that (if you don't then you *really* should :) otherwise, yeah just use mysql_query() or use the command line of course the second 2 options assume you can construct the SQL command to do it, using phpMyAdmin you won't really need to know. /beau //

RE: [PHP-DB] Help, need the scripts of processing the to-be-confirmed email.

2001-10-25 Thread Beau Lebens
// Question 1: // How to process the confirmation email by clicking the url // given in the email // and by replying the email. when you send them an email, include some sort of confirmation code ie http://server/confirm.php?confirmCode=xxx when they click, it passes this code, and you look

RE: [PHP-DB] Application variables

2001-10-28 Thread Beau Lebens
php doesn't have application variables as such, however there are a couple options for implementing them... 1. have a single file with your application variables and manually include that in all files of the project 2. use the session_*() functions to keep the vars alive on pages 3. as you said,

RE: [PHP-DB] getting database tables

2001-11-12 Thread Beau Lebens
or even mysql_list_tables() :) /beau // -Original Message- // From: Rick Emery [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 13 November 2001 1:47 AM // To: 'mike luce'; [EMAIL PROTECTED] // Subject: RE: [PHP-DB] getting database tables // // // In PHP: // $query = SHOW TABLES; //

RE: [PHP-DB] Date Calculation

2001-11-12 Thread Beau Lebens
in PHP, coming out in yyy-mm-dd date("Y-m-d", mktime(0,0,0, date("m"), date("d")+14, date("Y")); untested, so please test it - this will ignore hours, minutes, seconds (the leading 3 0's) and make a timestamp using mktime for this month, this day + 14, this year, then return it formatted as

RE: [PHP-DB] Database help needed

2001-11-21 Thread Beau Lebens
should be able to do something like SELECT whatever FROM whereever WHERE value='50' AND value='45' is that what you are looking for? // -Original Message- // From: Chris Payne [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 22 November 2001 3:11 PM // To: [EMAIL PROTECTED] //

RE: [PHP-DB] Flushing PHP output

2001-11-22 Thread Beau Lebens
if you just echo() the results/messages as you come across them, the page should incrementally load. in my experience (IE5?) if there is data being added to the page, then the browser will display what it can, and keep adding to it until the stream breaks or it finishes. one thing to note is

RE: [PHP-DB] date format question

2001-11-27 Thread Beau Lebens
try H as your hour format (date(H)+5) although out of interest, at 9:51am, using either g or H gives me 2:51 pm HTH /beau // -Original Message- // From: Matt Nigh [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 28 November 2001 9:48 AM // To: php-db // Subject: [PHP-DB] date format

RE: [PHP-DB] Run php page automatically

2001-12-20 Thread Beau Lebens
it's better to do something like 0,10,20,30,40,50* * * * /usr/bin/php -q /home/you/yourscript.php /dev/null since crontab actually stores the result of it's operations in a file (/home/you/Mailbox?) so you will bloat your server if you don't clear the output.

RE: [PHP-DB] I think i saw this somewhere....

2002-01-06 Thread Beau Lebens
*being a smart-ass from your email signature* sure... you can download the script from .. just kidding :) the best way to do this as far as I know would be to have a PHP script which had write-access to your apache conf files, which then just added in the required lines and restarted

RE: [PHP-DB] Can't use field names in print

2002-01-13 Thread Beau Lebens
you need to use the *_fetch_array() functions i.e. if you are using MySQL $SQL = something; // build SQL query $result = mysql_query($SQL); // execute query, save all results in $result $firstResult = mysql_fetch_array($result); // create an array containing each returned record // subsequent

RE: [PHP-DB] Can't use field names in print

2002-01-13 Thread Beau Lebens
you should be able to just change the mysql_fetch_row to a mysql_fetch_array and then use the names rather than the numbers in your print (modified below, not tested :) // ? // $user = root; // $pw = ; // $db = pete; // // $mysql_access = mysql_connect(localhost, $user, $pw); //

RE: [PHP-DB] Sanitizing user input for interaction with DB.

2002-01-13 Thread Beau Lebens
Hi Benny, I know this is a bit of a run-around again, but try the annotated manual on php.net, it has some good examples of using things here and there. Specifically useful functions are htmlspecialentities() htmlspecialchars() addslashes() stripslashes() nl2br() also, as far as using regexps

RE: [PHP-DB] Combining INSERT...SELECT and INSERT INTO

2002-01-16 Thread Beau Lebens
if you are using mysql then no i don't think you can do that, since it doesn't support nested queries - postgres or some other db may well support it tho but like miles said - give it a go :) (maybe on a test database/table just in case) hth -b // -Original Message- // From: Markus

RE: [PHP-DB] What is REG_BADRPT, and why do I get it?

2002-01-16 Thread Beau Lebens
on a guess - echo the value of $search_name in between each call to see what happens to it as it goes through - you may find that something is going haywire in there somewhere (or that it's blank) -b // -Original Message- // From: Markus Lervik [mailto:[EMAIL PROTECTED]] // Sent:

RE: [PHP-DB] Problem with mail function

2002-01-16 Thread Beau Lebens
also - rather than change the ini file, you can just put ?php set_time_limit(43200); ? which gives the script 12 hours to run (or however you think you need) i have a simple script for mailing out bulk mail done in php - it has successfully worked on 700 emails so far - so it works :) -b //

RE: [PHP-DB] Optimizing mail()

2002-01-16 Thread Beau Lebens
hey olinux - i did something like this with a mailing list thing i have for a website (insertfashionhere.com - about to be relaunched) and all i did was ordered the emails to be sent by their server - as you have said. mine were in a database, so in my select i did something liek SELECT email,

RE: [PHP-DB] Searching a variable

2002-01-16 Thread Beau Lebens
i don't doubt that there are probably better ways of going about this chris, but you can do something like; ?php $words = explode( , $searchText); $query = SELECT * FROM table WHERE ; foreach ($words as $word) { $query .= field LIKE '%word%' AND ; } $query .= field!='' ORDER BY

RE: [PHP-DB] Reading and Writing ?

2002-01-17 Thread Beau Lebens
easy peasy dave :) (pseudo-code - cause i'm lazy and hopefully you aren't :P) ?php[esque] create file pointer to file 1 (read-only r?) read file 1 into string close file pointer to file 1 create file pointer to file 2 (creating if necessary (w)) write string from file 1 to this pointer

RE: [PHP-DB] Connecting from PHP to MySQL on another Server

2002-01-17 Thread Beau Lebens
// 1. What is the difference between working with PHP and MySQL // on a local // server and working with PHP and MySQL when MySQL is on a // remote server? none - just specify different hostname in connection call (perhaps IP more reliable) // 2. What is the protocol used to connect to MySQL

RE: [PHP-DB] Updating multiple rows from a single form submission

2002-01-17 Thread Beau Lebens
Hi John - I have come up against this one a number of times, and have found that the following works pretty nicely - although there may be better ways out there - get your records from the db - loop thru them, using some sort of ID field to print each row in your table with names something

RE: [PHP-DB] Web Poll Using sql

2002-01-17 Thread Beau Lebens
Jacob, I think you can do something like UPDATE tablename SET fieldD=fieldD+1 WHERE pollTitle='title'; or similar? check the manual on updates and mathematical functions probably -b // -Original Message- // From: Jacob Wyke [mailto:[EMAIL PROTECTED]] // Sent: Friday, 18 January 2002

RE: [PHP-DB] HTTP authentication

2002-01-20 Thread Beau Lebens
not that this has anything to do with databases... ([php-db]) assuming; 1. you are using apache 2. you have command-line access to your server 3. your webhost has htaccess enabled and configured to use .htaccess as the security file you should be able to drop a file called (usally) .htaccess

RE: [PHP-DB] HTTP authentication

2002-01-20 Thread Beau Lebens
if you could still help me, or anyone else I would // greatly appreciate it! // // Yours, // // Kevin // Beau Lebens [EMAIL PROTECTED] wrote in message // news:[EMAIL PROTECTED]. // edu.au... // not that this has anything to do with databases... ([php-db]) // // assuming; // 1. you are using

RE: [PHP-DB] Easy way to calculate difference between two dates

2002-01-20 Thread Beau Lebens
soo what happens with php if you do something like convert them both to Y-m-d H:i:s and then subtract one from the other, i have a feeling (haven't tried) that php will handle the rest for you... // -Original Message- // From: SpamSucks86 [mailto:[EMAIL PROTECTED]] // Sent: Monday, 21

RE: [PHP-DB] drop down list

2002-01-30 Thread Beau Lebens
apologies for answering such an already-over-answered question, but i feel that no-one has given a particularly *good* answer, so i'll add mine to the list. I use this function (as well as a couple others which do similar things for all form elements; // Creates an HTML select box of values. //

RE: [PHP-DB] More Date operations.

2002-01-31 Thread Beau Lebens
you have changed the command from when you do it in mysql to when you do it in php - you are leaving out the ' quote marks around the date you are passing :) // $sql=SELECT TO_DAYS(2001-01-01) AS bar; should be // $sql=SELECT TO_DAYS('2001-01-01') AS bar; HTH beau // -Original

RE: [PHP-DB] javascipt window

2002-02-10 Thread Beau Lebens
Mike, you have a conflict with your different quote-styles, have a look at the source code when you output that and you will see what i mean, you need to do something like this; echo td ALIGN=\CENTER\a href=\javascript:launchwin('$row[5].htm','newwindow','height=480,width=640'

RE: [PHP-DB] Email Validation

2002-02-11 Thread Beau Lebens
have a look at the online annotated php manual under the regular expression functions, there are *stacks* of examples of using regexps to validate email patterns beau // -Original Message- // From: CrossWalkCentral [mailto:[EMAIL PROTECTED]] // Sent: Tuesday, 12 February 2002 12:20 PM

RE: [PHP-DB] protecting

2002-02-11 Thread Beau Lebens
you might find the library at http://www.dentedreality.com.au/jsvalidation/ useful, but you should also perform similar checks server-side using PHP since if you are that worried about malicious use of your site, people can easily circumvent javascript validation // -Original Message- //

RE: [PHP-DB] RE: Logging visits using a database

2002-02-14 Thread Beau Lebens
i think i saw an article on phpbuilder.com regarding how to set up a good thing for the path taken - something along the lines of storing IP vs time vs page hit, then a good method for selecting from the db that shows the path of the visitor HTH beau // -Original Message- // From:

RE: [PHP-DB] Session confusion :-(

2002-02-17 Thread Beau Lebens
are you always refreshing the session on each page dave? i am pretty sure you need to call session_start() on every page that you will be accessing the session-based variables. HTH beau // -Original Message- // From: Dave Carrera [mailto:[EMAIL PROTECTED]] // Sent: Saturday, 16

RE: [PHP-DB] sql query

2002-02-18 Thread Beau Lebens
try replacing WHERE display=$custcatergory); with WHERE display='$custcatergory'); and also tru echoing the value of that SQL statement (assign it to a var first) to make sure you are getting the right thing. HTH /b // -Original Message- // From: CrossWalkCentral [mailto:[EMAIL

RE: [PHP-DB] formating problem

2002-02-19 Thread Beau Lebens
htat's because the delete button is in the wrong place in your code. if you put an HTML element between the table and /table tags, but don't enclose it in at least tr and td tags (pretty loose about closing them, but of course you should always close your tags!) then the browser will display

[PHP-DB] SELECT where something exists but something else does not

2002-02-20 Thread Beau Lebens
that doesn't eqal '2002', even if they happen to also have one that *is* for 2002 (ie. my test student has a report for 1999, 2001 and 2002, but still gets selected by that -- Beau Lebens, Technical Officer Science and Mathematics Education Centre Curtin University of Technology, GPO Box U1987 Perth

RE: [PHP-DB] Join

2002-02-20 Thread Beau Lebens
what you are referring to actually has nothing to do with PHP Jen - that's why the manual wasn't much help :) JOIN is an SQL command, so check out the manual of your RDBMS (ie. http://www.mysql.com/doc/J/O/JOIN.html for MySQL) good luck :) Beau // -Original Message- // From: Jennifer

RE: [PHP-DB] Still bangin my head

2002-02-25 Thread Beau Lebens
you would need to do a select and find out how much is in the account first, then do a check on the equation to see if the result is going to come out negative - if it is, then either don't allow it, or give them an option to clear the account or whatever, otherwise just go ahead and do the

  1   2   >