Re: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Bastien Koert
in many applications) and its secure. Basically you build an admin area, whereby some trusted users have admin privileges and assign those to various users. The permissions themselves are simply yes/no fields, assigned with checkboxes or radio buttons. Bastien Koert From: M Saleh EG [EMAIL PROTECTED

Re: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Bastien Koert
if its well designed, Bastien From: Stuart Felenstein [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] Passing URL parameters, how to hide Date: Tue, 21 Sep 2004 06:45:48 -0700 (PDT) See response interspersed

Re: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Bastien Koert
When I request update.php?recordID=2, you should be doing something like SELECT * FROM Record_Table WHERE recordID = 2 AND userID = 3, which will not return any rows. Okay that makes sense I will try that. Though I'd imagine the SQL will need to be different since I could be dealing with

Re: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Bastien Koert
Thats why I said CAN, since it is unreliable Bastien From: John Holmes [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] CC: [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP-DB] Passing URL parameters, how to hide Date: Tue, 21 Sep 2004 10:22:32 -0400

Re: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Bastien Koert
Sounds about right...I would use the session variable for the user name so that is not even present...but that is the result that you want... Bastien From: Stuart Felenstein [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] CC: [EMAIL PROTECTED

Re: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Bastien Koert
No, No, NO! The user id should not be in the hidden elements in the form. You need to store that in a session variable for the duration of that user's session. Otherwise they can try to hack by changing the combination until they hit another valid record. Bastien From: Stuart Felenstein [EMAIL

RE: [PHP-DB] Where can I download the php_oci8.dll and ph_oracle.dll ?

2004-09-21 Thread Bastien Koert
they are in the extensions folder in the php folder. From: Saeid Banaei [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Where can I download the php_oci8.dll and ph_oracle.dll ? Date: Tue, 21 Sep 2004 14:30:10 -0400 Hi, I am trying to use the PHP in windows, IIS environment to access an

RE: [PHP-DB] MultSelect ListBox hell!

2004-09-22 Thread Bastien Koert
need to have AND between states and jobs select * from tablename where (jobs='accounting' or jobs='bookkeeping') and (state = 'AL' or state='CA') Bastien From: Stuart Felenstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] MultSelect ListBox hell! Date: Wed, 22 Sep 2004 05:19:36

RE: [PHP-DB] MultSelect ListBox hell!

2004-09-22 Thread Bastien Koert
like that needs to be done for each element in the search Bastien From: Stuart Felenstein [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP-DB] MultSelect ListBox hell! Date: Wed, 22 Sep 2004 06:49:55 -0700 (PDT) Correct, I've added that AND, and so now

RE: [PHP-DB] mysql to postgres migration blues...

2004-09-23 Thread Bastien Koert
Could be a scope problem. The connection is declared outside the function and the attempt to run a query is inside the function...Maybe add the global command to the connection. Or declare the connection inside the function... Bastien From: Antoine [EMAIL PROTECTED] Reply-To: Antoine [EMAIL

RE: [PHP-DB] ER diagram class

2004-10-12 Thread Bastien Koert
www.fabforce.net - dbdesigner...great tool and free bastien From: Matthew Perry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] ER diagram class Date: Mon, 11 Oct 2004 18:03:11 -0500 Does anyone know a good class or program that automatically generates an ER diagram from all tables in

RE: [PHP-DB] autoresponder

2004-10-12 Thread Bastien Koert
You'd need to parse out the email (or at least the subject of that email) then find a file based on that subject, then email the file...it is possible. I wrote a script to parse out emails, you can find it at weberdev.com in the php examples area (look for my name). hth Bastien From: Kenny

RE: [PHP-DB] folder creation in php

2004-10-12 Thread Bastien Koert
use the headers header(Content-Length: .filesize($filepath)); header(Content-type: application/octet-stream); header(Content-disposition: $attachment filename={$newfile}); header(Content-Transfer-Encoding: binary); readfile($filepath); bastien From: Adil [EMAIL PROTECTED] To: [EMAIL PROTECTED]

RE: [PHP-DB] deleting multiiple records from database

2004-10-13 Thread Bastien Koert
echo out the sql just before you execute it when doing the delete, ensure that the values that you are expecting to be deleted are being deleted bastien From: Adil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] deleting multiiple records from database Date: Wed, 13 Oct 2004 16:11:36

RE: [PHP-DB] MySQL, Multiple tables, and Multipage form using sessions

2004-10-13 Thread Bastien Koert
If you are usiing the INNOdb table type/engine in the mysql db, it supports transactions. you can wrap the entire set of sql statement in a transaction and they would get executed as one block. If any fail, then the whole thing is rolled back. This DOES NOT work with the myISAM table types.

RE: [PHP-DB] Converting Date for mysql

2004-10-14 Thread Bastien Koert
did you look to see what the data format was? many of these calendars fill in american dates (mm-dd-) and mysql prefers (-mm-dd)check to see what the format is before you assign it to the session id... bastien From: Stuart Felenstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] pdf

2004-10-15 Thread Bastien Koert
www.fpdf.org bastien From: balwantsingh [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] pdf Date: Fri, 15 Oct 2004 13:53:00 +0530 hi all, i want to how i can save the data retrieved from mysql through php in pdf format. thanks for your help in advance. with

Re: [PHP-DB] MySQL max records

2004-10-16 Thread Bastien Koert
Have a look at some of the case studies at mysql.comthere are servers handling 50Million records with not problemsat a certain point it becomes more a hardware issue than a db server issue... bastien From: -{ Rene Brehmer }- [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP-DB]

RE: [PHP-DB] Form Processing

2004-10-16 Thread Bastien Koert
yes, you can have multiple submit buttons, you would simply need to test for the value of that button on the server if ($_POST['submit']==delete){ //delete something } if ($_POST['submit']==update){ //update something } and so one hth Bastien From: Ron Piggott [EMAIL PROTECTED] To: PHP DB

RE: [PHP-DB] How to optimize select of random record in DB ?

2004-10-15 Thread Bastien Koert
skip the two step process and use RAND in the sql statement SELECT * FROM table1, table2 WHERE a=b AND cd ORDER BY RAND() LIMIT 1000; bastien From: -{ Rene Brehmer }- [EMAIL PROTECTED] To: [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: [PHP-DB] How to optimize select of random record in DB ? Date:

RE: [PHP-DB] PHP functions independant executions

2004-10-17 Thread Bastien Koert
you can execute scripts as cron jobs. what is the OS? Note that for cron jobs you should not have browser based output...any output, errors, etc should be sent to a file. bastien From: Matthew Perry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP functions independant executions

RE: [PHP-DB] Detailed db error codes

2004-09-27 Thread Bastien Koert
You need to use pg_result_error or pg_last_error. Generally, you code to run the query, in the next line you check for an error and pass the error off to some error handling function ie $result = pg_query($sql); if (pg_last_error($result) == false){ //here was an error $error =

RE: [PHP-DB] error

2004-09-28 Thread Bastien Koert
try checking for the value if (isset($_POST[op] != addpost)) { or to supress the error, use the '@' symbol in fron of the $_POST or $_GET if (@$_POST[op] != addpost) { Bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] error Date: Tue, 28 Sep 2004 06:58:10 EDT Dear friends,

RE: [PHP-DB] Convert plain text to HTML tagged text

2004-09-28 Thread Bastien Koert
why not do a search and replace on the way out to the browser? ? ... $text = $rows['longtextobject']; $text = str_replace(\r,p,$text); ... echo $text; ... ? bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Convert plain text to HTML tagged text Date: Tue, 28 Sep 2004

RE: [PHP-DB] I have a query

2004-09-29 Thread Bastien Koert
if the tables have the same structure, use the union operator to query each table separately and return it all in one result set select * from asset1 where asset_loc='heaven' union select * from asset2 where asset_loc='heaven' union select * from asset3 where asset_loc='heaven' union select *

RE: [PHP-DB] searchengine input split

2004-09-30 Thread Bastien Koert
here is something similar. you should be able to adapt this easily ? //Google like search engine for your site, //the $not_search_word array can be added to, //to limit the results even further for those //common words that should not be searched for. foreach ($searchwords as $word) { /* For

Re: [PHP-DB] rand()

2004-09-30 Thread Bastien Koert
The MYI file is the index file. Is there an index on that table? From: [EMAIL PROTECTED] (Jennifer Goodie) To: blackwater dev [EMAIL PROTECTED] CC: [EMAIL PROTECTED], Subject: Re: [PHP-DB] rand() Date: Wed, 29 Sep 2004 23:27:43 + -- Original message from blackwater dev :

RE: [PHP-DB] microsoft access

2004-09-30 Thread Bastien Koert
Here is a basic connect script. I would stringly recommend against using access, use mysql instead. HTML HEAD /HEAD BODY ?php // Program to test connecting to a Microsoft Access ODBC Data Source $connection = odbc_connect(postcard, , ); print Connected to datasourceBRBR;

RE: [PHP-DB] MySQL performance and crash

2004-10-01 Thread Bastien Koert
Do you have indexes on the searched columns? Are you searching on numeric links not text (numbers are easier to compare) What is your structure / data like? Bastien From: Murat BIYIKLI [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL performance and crash Date: Fri, 1 Oct 2004

RE: [PHP-DB] Setting a timed-session

2004-10-01 Thread Bastien Koert
http://ca3.php.net/manual/en/function.session-set-cookie-params.php is what you need to look at. set_time_limit only sets a time limit for the script itself. it does not affect the sessions bastien From: Philip Thompson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Setting a

Re: [PHP-DB] Re: Convert plain text to HTML tagged text

2004-10-02 Thread Bastien Koert
just run them in order $test=str_replace(...); $test=str_replace(...); $test=str_replace(...); $test=str_replace(...); bastien From: GH [EMAIL PROTECTED] Reply-To: GH [EMAIL PROTECTED] To: Felipe Alcacibar [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Convert plain text to

Re: [PHP-DB] Multiple Oracle connections

2004-10-04 Thread Bastien Koert
Have you talked to the dba to see if the Oracle DB will accept more than one thread from the apache server? Bastien From: Christopher Jones [EMAIL PROTECTED] To: Chris Back [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Multiple Oracle connections Date: Mon, 04 Oct 2004 16:44:10

RE: [PHP-DB] Opinions wanted - Multi select lists , implode explode

2004-10-04 Thread Bastien Koert
I've used it sucessfully many times. It may the other person's unfamiliarity with arrays and variables I created the below function which will handle both single choice and multiple choice drop down values and mark them as selected when the user views that drop down again. bastien ? function

RE: [PHP-DB] Postgres Trigger

2004-10-04 Thread Bastien Koert
Write a small script that runs the sp, then create a cron job that fires off that page/script at whatever your set time requirements are bastien From: Norma Ramirez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Postgres Trigger Date: Mon, 4 Oct 2004 08:41:50 -0500 Hi! Does any one

RE: [PHP-DB] dropdown list - help

2004-10-04 Thread Bastien Koert
I created the below function which will handle both single choice and multiple choice drop down values and mark them as selected when the user views that drop down again. bastien ? function my_select($name,$rows,$multiple,$array_list,$match) { //this select box takes the above 5 arguements to

RE: [PHP-DB] Opinions wanted - Multi select lists , implode explode

2004-10-04 Thread Bastien Koert
PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP-DB] Opinions wanted - Multi select lists , implode explode Date: Mon, 4 Oct 2004 10:40:12 -0700 (PDT) Okay, well a couple of questions. If you don't mind. Right below is the code I have , and the multiple list box

RE: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Bastien Koert
if you echo $Sent, what do you get? bastien From: Valerie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Mail Header Redirect Date: Tue, 5 Oct 2004 08:24:26 -0400 I have an email that is sent upon submission of a form. I need to redirect to a confirmation page if email is sent

Re: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Bastien Koert
so try if ($sent==true) { mailsent(); } bastien From: Valerie [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] Mail Header Redirect Date: Tue, 5 Oct 2004 12:34:27 -0400 When I echo $sent, it returns 1. Thanks, Valerie - Original Message

RE: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Bastien Koert
If its an autoincrement, the next highest number will be assigned by the db. There is no need to query the db to find it. Simply insert the record and leave the id field out of the insert statement. bastien From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB]

RE: [PHP-DB] Ascending and Descending records

2004-10-05 Thread Bastien Koert
include a link(s) at the top of the column(asc/desc) and pass that value back to the server. then use that value to sort the column link = a href='?=$_SERVER['PHP_SELF']??col=colnamesort=asc'Asc/a then on the server $col = $_REQUEST['col']; $sort= $_REQUEST['sort']; sql= select * from tableName

Re: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Bastien Koert
can you put some output in the function itself to see if its the function that blowing up and or if its the mail call... bastien From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Mail Header Redirect Date: Tue

RE: [PHP-DB] Obfuscator

2004-10-07 Thread Bastien Koert
Whats the point? Security thru obfuscation is not security at all. If you deem your site/data that sensitive, upgrade to ssl , lock the db down tight and pray that the sys admins at your host are on top of exploits and hacks to keep the server safe. Bastien From: Stuart Felenstein [EMAIL

Re: [PHP-DB] Re: Passing url parameters

2004-10-07 Thread Bastien Koert
yes, serialize the array. then unserialize it on the other side. look it up in the manual bastien From: Gary Hotko [EMAIL PROTECTED] Reply-To: Gary Hotko [EMAIL PROTECTED] To: Amit Arora [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Passing url parameters Date: Fri, 8 Oct

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Bastien Koert
Hi Stu 1. why not check it on every page, then if it fails the user won't need to make it to the end and then have to go back to the beginning to fix something minor. 2. You could use hidden fields to pass the data back and for or just use a session, otherwise the variables expire on that page

RE: [PHP-DB] Help: First Time Form with Sessions

2004-10-08 Thread Bastien Koert
see interspered again ;) From: Stuart Felenstein [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP-DB] Help: First Time Form with Sessions Date: Fri, 8 Oct 2004 08:56:48 -0700 (PDT) See interspersed: --- Bastien Koert [EMAIL PROTECTED] wrote: Hi Stu 1

RE: [PHP-DB] Why does this conditional run, even if not true?

2004-10-08 Thread Bastien Koert
hard to say without the code for the function...what is returned by the fuction determines if the code runs, right? Are you sure the code is returning YES? Maybe post the code for the function bastien From: Karen Resplendo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Why does this

RE: [PHP-DB] Re: [PEAR] Pear installation error

2004-10-08 Thread Bastien Koert
You could make life really simple and write csv document (excel loves those as long as you handle the data right)force the file to download with the additional add-type header set to vnd/ms-excel and excel opens it up automagically...much simpler, no? we do this for (gasp) asp data to

RE: [PHP-DB] unexplained delay between db connection and db write operations

2004-10-17 Thread Bastien Koert
So you have local code executing against a remote server? And you have the proper accounts and authentication, and direct acccess to the machine? Could this be an issue where users/aapilcations are still locking the old table before the drop command is issued? What is the current load on the

RE: [PHP-DB] Re: Office document upload to website (and inserting in MySQL if possible)

2004-10-02 Thread Bastien Koert
here is some code i wrote for a guy. ?php session_start(); // redefine the user error constants - PHP 4 only define(FATAL, E_USER_ERROR); define(ERROR, E_USER_WARNING); define(WARNING, E_USER_NOTICE); // set the error reporting level for this script error_reporting(FATAL); //Declarations $myfile

RE: [PHP-DB] backing up off of web host

2004-10-18 Thread Bastien Koert
Write a script that exports to text and then zips the file. You can then download the file or have it emailed. Its a good idea, you should take control of your data. Bastien From: Matthew Perry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] backing up off of web host Date: Sun, 17

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

2004-10-18 Thread Bastien Koert
check out www.phpforflash.com or www.flashkit.com bastien From: Juan Stiller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Showing all mysql query results! Date: Mon, 18 Oct 2004 15:24:53 -0300 (ART) Ok, i just followed your advice for make the code easier to read, it looks good,

RE: [PHP-DB] setting root password

2004-10-19 Thread Bastien Koert
try set password for 'root'@'localhost' = PASSWORD('somepassword'); bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] setting root password Date: Tue, 19 Oct 2004 08:36:37 -0500 Matt, Is there a space between PASSWORD and the opening parenthesis? There shouldn't be, if

RE: [PHP-DB] setting root password

2004-10-19 Thread Bastien Koert
when you log on, there is no default database set to use type: use mysql bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] setting root password Date: Tue, 19 Oct 2004 11:09:56 -0500 I entered select user(); It outputs:

RE: [PHP-DB] php mssql

2004-10-19 Thread Bastien Koert
Th cols are likely defined as CHAR not as VARCHAR. CHAR cols will pad out the length of the value to the full width of the column...change the type to varchar... bastien From: Dale Hersowitz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] php mssql Date: Tue, 19 Oct 2004 09:36:25

RE: [PHP-DB] Changing this php code to show multiple variables!

2004-10-20 Thread Bastien Koert
http://flashkit.com/board/showthread.php?s=95608f8e3b6478833f8e42171424bf7fthreadid=505071highlight=pass+php+array is a discussion about php and flashthe poster 'argonauta' recommend the use of xml, otherwise the solution is to use individual elements for key value pair bastien From: Juan

RE: [PHP-DB] Changing this php code to show multiple variables!

2004-10-20 Thread Bastien Koert
Another option might be to place all the elements of each value (ie all first names) into a csv or other characters separated string and then use the split command to separate out the elements into an actionscript array hth bastien From: Norland, Martin [EMAIL PROTECTED] Reply-To: [EMAIL

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

2004-10-20 Thread Bastien Koert
check both single and double quotes replace them with ('') and () respectively, try mysql_real_escape_string() functions bastien From: Gaby T. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Text corruption when storing to MySql Date: Wed, 20 Oct 2004 12:49:51 -0700 I am running into

RE: [PHP-DB] Cookies with databases

2004-10-20 Thread Bastien Koert
Hi Jason, 1. I don't think you need the quotes around the values. 2. is the user cookie set? bastien From: Jason T. Davidson [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Cookies with databases Date: Wed, 20 Oct 2004 19:54:54 -0500 I am trying to set a

Re: [PHP-DB] Cookies with databases

2004-10-22 Thread Bastien Koert
. is the user cookie set This I do not know as I am trying to test this on that second page. I get nothing, so I am assuming that it isn't set, however the first one $cid is working just fine, but it's variable doesn't come from a database. -- Jason Davidson Bastien Koert wrote: Hi Jason, 1. I

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

2004-10-22 Thread Bastien Koert
What about writing a function that will store some of those required variables into a db. Then on the second site, open a link to the first db and query for those values that you need? bastien From: Andre Matos [EMAIL PROTECTED] To: 'Matt M.' [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] imagecreatefromjpeg()

2004-10-22 Thread Bastien Koert
Have you enabled the gd library? If windows, have you copied the php_gd2.dll to the c:/windows/ folder? bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] imagecreatefromjpeg() Date: Fri, 22 Oct 2004 13:45:02 -0500 I am using PHP 4.1

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

2004-10-22 Thread Bastien Koert
Write a function that gets called frequently (or with a cron job) to clean out session records every half an hour or so... Each time a page loads with those session vars, update the timestamp in that record. bastien From: Andre Matos [EMAIL PROTECTED] To: 'Bastien Koert' [EMAIL PROTECTED] CC

RE: [PHP-DB] How do i connect too DBISAM database

2004-10-25 Thread Bastien Koert
PHP is platform agnostic, so the code you write on windows will work on *nix, within certain OS dependant limitations. Like COM suuport is windows only. The question for you is: Firebird is also platform agnostic (from the docs) but I have not worked with it and am unsure as to portability of

RE: [PHP-DB] Need simple example for making an odbc connection

2004-10-25 Thread Bastien Koert
here is an access one HTML HEAD /HEAD BODY ?php // Program to test connecting to a Microsoft Access ODBC Data Source $connection = odbc_connect(postcard, , ); print Connected to datasourceBRBR; //$sql=SELECT * FROM postcard; $sql=insert into postcard (sendername,

Re: [PHP-DB] Implementing search in a database driven website

2004-10-26 Thread Bastien Koert
regex replace them all bastien From: Robby Russell [EMAIL PROTECTED] To: Vinayakam Murugan [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Implementing search in a database driven website Date: Tue, 26 Oct 2004 16:57:36 -0700 On Wed, 2004-10-27 at 00:33 +0530, Vinayakam Murugan

RE: [PHP-DB] Date Question

2004-10-27 Thread Bastien Koert
How are you trying to convert the date? bastien From: Bomgardner, Mark A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Date Question Date: Wed, 27 Oct 2004 11:17:16 -0500 I am having trouble converting a date from mm/dd/ to -mm-dd on a user form. I know there was post about

RE: [PHP-DB] I can't seem to get Max() to work

2004-10-28 Thread Bastien Koert
is it an iteger type datafield? bastien From: Chris Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] I can't seem to get Max() to work Date: Thu, 28 Oct 2004 01:05:46 -0400 Hi there everyone, I can’t seem to get the below to work with PHP and MySQL: $sql = SELECT

RE: [PHP-DB] returning inserted ids using load data local infile

2004-10-28 Thread Bastien Koert
For bulk loads, its proably best to query the db for the max id number before the load starts and then do the same after... last_insert_id only returns the last inserted id Bastien From: blackwater dev [EMAIL PROTECTED] Reply-To: blackwater dev [EMAIL PROTECTED] To: [EMAIL PROTECTED]

RE: [PHP-DB] Time Field

2004-10-28 Thread Bastien Koert
Best to use int field type and store the difference between the unix timestamp start time and the unix timestamp end time (both seconds since the epoch) which would be the number of seconds it took to complete the task. This number can then be manipulated with math to provide elapsed times in

RE: [PHP-DB] PHP does not show errors

2004-10-28 Thread Bastien Koert
post code, what are we, mindreaders? bastien From: Andre Matos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP does not show errors Date: Thu, 28 Oct 2004 17:48:56 -0400 Hi List, I have developed some classes to access MySQL. When I was testing the classes, I always got a blank

RE: [PHP-DB] Problems with mysql_num-rows()

2004-10-31 Thread Bastien Koert
Very simply, either your connection is messed up, you are not getting a result set back or there is an error in your sql try this: $result = mysql_query($query, $link) or die (failed because .mysql_error()); then start debugging bastien From: Arne Essa Madsen [EMAIL PROTECTED] Reply-To: Arne

RE: [PHP-DB] Fixing this code to show all variables!

2004-11-01 Thread Bastien Koert
remove the @ symbol from in front of the connect functions @mysql_connect @mysql_select_db Its supressing any errors that you may have...when you finish the debugging, then you can add them back in. bastien From: Juan Stiller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Fixing this

RE: [PHP-DB] Insert and Update on same page

2004-11-01 Thread Bastien Koert
Sure, the easiest way is to get that unique value with PHP and then insert it, then you can show the form again with that unique value, no need to do an update or other manipulation, if I understand your requirements correctly... Bastien From: Bomgardner, Mark A [EMAIL PROTECTED] To: [EMAIL

RE: [PHP-DB] MySQL data harvester

2004-11-02 Thread Bastien Koert
write a script that will access the information, then use a CRON to schedule the collection at whatever intervals suite your needs. Bastien From: Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL data harvester Date: Tue, 2 Nov 2004 10:05:50

RE: [PHP-DB] Problem with script

2004-11-02 Thread Bastien Koert
from the brief error message your provided, I think its blowing up on the single quote contained in the word can't. you need to handle this by choosing one a few of these methods replace all single quotes with two single quotes $text = str_replace(','', $text); addslashes function $text =

RE: [PHP-DB] Mysql Function to display number of records

2004-11-02 Thread Bastien Koert
use the offset parameter $offset = 0; //and is set from the application SELECT * FROM blah WHERE something0 LIMIT $offset , 5; bastien From: [EMAIL PROTECTED] (Jovan Ross) To: [EMAIL PROTECTED] Subject: [PHP-DB] Mysql Function to display number of records Date: 2 Nov 2004 20:28:41 - I have a

RE: [PHP-DB] How to get unique entries?

2004-11-02 Thread Bastien Koert
select distinct(datefield) from bastien From: Chris Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] How to get unique entries? Date: Tue, 2 Nov 2004 17:24:48 -0500 Hi there everyone, I’m listing entries by date in a dropdown box, but on some days there are 7-8+ dates the

RE: [PHP-DB] Using an array(-ish) in SQL queries

2004-11-02 Thread Bastien Koert
DELETE FROM the_table WHERE `ID` IN(1,2,3,4,5,6) will work just fine. The trick is to be sure that those records indeed are to be deleted. I prefer to mark the record as deleted for a time before permanent deletion. That way its recoverable should something really bad happen. bastien From: -{

RE: [PHP-DB] how to add UPDATE,DELETE for inventory management system using sqlite db

2004-11-05 Thread Bastien Koert
The logical way t o approach this is to add the buttons and have some control code that passes control off to a function based on what button was pressed. ? if (isset($_POST['submit'])){ $btnSubmit = $_POST['submit']; } if ($bntSubmit==Add){ add(); } //add / edit (update) are all the same

RE: [PHP-DB] Help me please

2004-11-08 Thread Bastien Koert
have you created a dsn for this connection? Bastien From: Petrus Ali Saputra [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Help me please Date: Mon, 08 Nov 2004 10:55:45 +0700 Can anyone here help me how to connect to an ODBC data? Here is my code: $odbc = odbc_connect(Ta Fara,,); And

RE: [PHP-DB] MySQL problem..

2004-11-08 Thread Bastien Koert
Check the mysql website. Have you upgraded from 4.0x to 4.1 recently. If so you need to update the client libraries that come with mysql. There are significant protocol changes from 4.0x to 4.1. Bastien From: ian [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] mysqldump

2004-11-09 Thread Bastien Koert
Does that user have permissions to run the mysql dump ? Bastien From: Aaron Todd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] mysqldump Date: Tue, 9 Nov 2004 12:59:31 -0500 I have created a PHP script that looks like: ?php $filename = /var/www/html/db_backup_ . date(n-j-y)..sql;

RE: [PHP-DB] Problem with an insert query

2004-11-13 Thread Bastien Koert
what mysql version are you running? versions under 4.1 DONT support subqueries bastien From: GH [EMAIL PROTECTED] Reply-To: GH [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Problem with an insert query Date: Sat, 13 Nov 2004 01:29:58 -0500 In my mySQL database I have the following

RE: [PHP-DB] MSSQL Server Integration

2004-11-13 Thread Bastien Koert
Try the manual www.php.net/mssql From: Noel Simela [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] MSSQL Server Integration Date: Sat, 13 Nov 2004 19:15:48 +0200 Hie guys, Does anyone have any idea how I can make my php pages to work with MS SQL Server.. regards Noel -- PHP Database

RE: [PHP-DB] Nested forms in php (subform)

2004-11-13 Thread Bastien Koert
either use a join in the sql syntax to access the data or consider an iframe bastien From: Alvaro Cobo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Nested forms in php (subform) Date: Sun, 14 Nov 2004 01:35:59 + (GMT) Hi guys: I am a very newby in this php stuff and I need a huge

Re: [PHP-DB] IIS and php sessions

2004-11-15 Thread Bastien Koert
save path variable for sessions by default is /tmp which is a linux default try changing it to /temp bastien From: John Holmes [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Adil [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] IIS and php sessions Date: Mon, 15 Nov 2004 16:01:47

RE: [PHP-DB] IIS/PHP question

2004-11-16 Thread Bastien Koert
can you show some code? bastien From: Adil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] IIS/PHP question Date: Tue, 16 Nov 2004 11:16:40 -0500 I'm having a weird issue with sessions on IIS running PHP. I was finally able to use sessions on IIS by setting the save_path to /temp and

RE: [PHP-DB] neebee: on table designs.

2004-11-17 Thread Bastien Koert
small tables are easier to maintain and grow and quicker to search. need more info about the data to really help. probably 1 main clients table with basic info and then 1 or more smaller tables that hold certain specifics bastien From: phpnews [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] mysql db dump with php

2004-11-17 Thread Bastien Koert
if you have access to phpmyadmin, use that to dump the table and then re-import the created files in the server bastien From: Nate Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql db dump with php Date: Wed, 17 Nov 2004 10:08:43 -0600 I tried this but to no avail.

RE: [PHP-DB] PHP on an Windows intranet with MSOffice-like templates

2004-11-17 Thread Bastien Koert
yes, its possible. use www.fpdf.org to create the pdfs for you (gets around the word COM interface) and allows for database storage of template letters as text, simpler to maintain and change. FPDF will have some examples that will make this easy for you. Another option is to use straight html

RE: [PHP-DB] validate/sanitize data

2004-11-17 Thread Bastien Koert
see htmlentities function in the manual http://ca3.php.net/manual/en/function.htmlentities.php bastien From: Todd Trent [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] validate/sanitize data Date: Wed, 17 Nov 2004 15:06:55 -0500 I need to add textarea input into a mysql database. The

RE: [PHP-DB] timestamp problem

2004-11-18 Thread Bastien Koert
this is a common mysql timestamp problem, you can try using DATE_FORMAT(datefield, FORMAT) sql function to define the date, or store the timestamp as a unix timestamp (an integer) from the get go bastien From: Doug Parker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] timestamp

RE: [PHP-DB] Updating count on record results

2004-11-19 Thread Bastien Koert
this is how I did it for a client's site // update the number of times the vehicle has been viewed mysql_db_query($dbname, UPDATE vehicle_inventory SET viewed=viewed+1 WHERE ccode='$ccode', $link); bastien From: Stuart Felenstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Updating

RE: [PHP-DB] Updating count on record results

2004-11-19 Thread Bastien Koert
($data[comments]); // update the number of times the vehicle has been viewed mysql_db_query($dbname, UPDATE vehicle_inventory SET viewed=viewed+1 WHERE ccode='$ccode', $link); ...? bastien From: Stuart Felenstein [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE

RE: [PHP-DB] Currency and number types...

2004-11-19 Thread Bastien Koert
number_format() is what you need look it up bastien From: Mark Benson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Currency and number types... Date: Fri, 19 Nov 2004 17:35:53 + I'm trying to display data calculated by my script as a currency. The problem I have is that PHP is

RE: [PHP-DB] Question on FilesSessions

2004-11-19 Thread Bastien Koert
Better to save the file locally, the pass the name in a session variable. otherwise the overhead of holding a multi Kb or Mb file will be killer on the system. What are you trying to do with the file? Bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Question on

Re: [PHP-DB] password encryption

2004-11-19 Thread Bastien Koert
You need to understand how the htaccess file and its passwords are created. using mcrypt will likely lead to problems. htaccess passwords are encrypted with DES algorithm [quote http://www.edevcafe.com/viewdoc.php?eid=97] If you wanted to write a CGI script to help you add/delete users from

RE: [PHP-DB] Optimize Query Output

2004-11-20 Thread Bastien Koert
Usse PHP to control the output, test for the value and if it changes show else don't show it bastien From: GH [EMAIL PROTECTED] Reply-To: GH [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: [PHP-DB] Optimize Query Output Date: Sat, 20 Nov 2004 00:39:36 -0500 I have the

RE: [PHP-DB] Functions

2004-11-23 Thread Bastien Koert
http://ca.php.net/manual/en/function.substr-count.php From: Yemi Obembe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] Functions Date: Tue, 23 Nov 2004 00:59:11 -0800 (PST) Hi wizs, Anybody knows any fuction that can count occurence of a character in a string (not in a array).

RE: [PHP-DB] number format

2004-11-28 Thread Bastien Koert
explode() RTFm bastien From: balwantsingh [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] number format Date: Sat, 27 Nov 2004 18:07:27 +0530 hello, may pls. suggest me how i can retreive number before decimal and after decimal. for example 123456.7. I want to

  1   2   3   4   5   6   7   8   >