Re: [PHP-DB] Executing a query in the future

2007-09-13 Thread Brad Bonkoski
cron? or if on windows they have a scheduler, and then just run a command line PHP script that checks due dates and sends out emails as necessary, not sure you need a web page to send out email notifications... -B Mark Bomgardner wrote: I am looking for a way in PHP to execute a query at

Re: [PHP-DB] use of str_split

2007-08-09 Thread Brad Bonkoski
Looks like the function str_split() is a PHP 5 addition, so I guess it might be because you are using php 4? You can also do this with substr() function... Something like this: ?php $str = abcdefg; $arr = Array(); for($i=0; $i strlen($str); $i++) { $arr[] =

Re: [PHP-DB] use of str_split

2007-08-09 Thread Brad Bonkoski
This was my initial thought too, but from the manual: If /delimiter/ is an empty string (), *explode()* will return *FALSE*. If /delimiter/ contains a value that is not contained in /string/, then *explode()* will return an array containing /string/. So, this would not satisfy the

Re: [PHP-DB] MySQL BETWEEN Problems

2007-05-18 Thread Brad Bonkoski
I think you need between 'A' and 'F%' Aa is between A and F but 'Fa' is not between 'A' and 'F' (but 'Ez' would be between 'A' and 'F') -B Tony Grimes wrote: I'm using BETWEEN to return a list all people who's last names fall between A and F: WHERE last_name BETWEEN 'A' AND 'F' ... but

Re: [PHP-DB] MySQL BETWEEN Problems

2007-05-18 Thread Brad Bonkoski
' . That'll get you Aa-Fz :) On 5/18/07, Tony Grimes [EMAIL PROTECTED] wrote: We tried that and it didn't work. We've also tried every combination of upper and lower case too. Tony On 5/18/07 2:18 PM, Brad Bonkoski [EMAIL PROTECTED] wrote: I think you need between 'A' and 'F%' Aa

Re: [PHP-DB] echo

2007-03-29 Thread Brad Bonkoski
elk dolk wrote: thanks to Chris and Dimiter, I think I am close but still the problem is not solved, when I add echo img src='/album/img/.$row[photoFileName].' / to the code as it was sugested by Dimiter there is parse Error : PHP Parse error: syntax error, unexpected $end in

Re: [PHP-DB] Re: Creating a Table to line query results in php?

2007-03-03 Thread Brad Bonkoski
How can I create a table...or even something similar...to line information up? echo table; echo trthHeader1/ththHeader2/ththHeader N/th/tr; while ($data = mysql_fetch_array($res)) { $idfield = $data['IDFIELD']; $name = $data['Name']; $effect = $data['Effect']; $category = $data['Category'];

Re: [PHP-DB] Problem with ocilogon

2007-02-16 Thread Brad Bonkoski
Dominik Helle wrote: Hi, I've a problem with php-oci and I hope anybody can help me. I want to connect with ocilogon to an Oracle Database. If i call my php-Script in the browser, this error message turn up: Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread Brad Bonkoski
Matthew Ferry wrote: Hello Everyone Got a simple / stupid question. Worked on this all night. I'm over looking something very basic here. The query event_time brings back the calendar id for each event that is pending in the future. ie 12, 13, 14, 26 (There could be 100 of them out

Re: [PHP-DB] Installation Problem

2006-11-15 Thread Brad Bonkoski
Check out the installation instructions for Windows... MYSQL support is not working with your PHP, if memory serves me correctly you just need to uncomment a dll in your php.ini file, but check out: http://www.php.net/manual/en/ref.mysql.php -B Abdou Karim Jallow wrote: I have just upgraded

Re: [PHP-DB] Simple question on auto_increment

2006-11-13 Thread Brad Bonkoski
mario wrote: Hello, really a mysql question. Pls. help anyway. Is there a simple, common way to implemt the following: Say I have a table with a id autoincrement field. I wish to insert a record but just ist id value, get back the id value, use it to update the record. Do I need three

Re: [PHP-DB] textarea value assignment

2006-10-04 Thread Brad Bonkoski
[EMAIL PROTECTED] wrote: Hello how I could assign a textarea with a variable value? Although I tried to achieve an allocation like a normal input, but it does not work so I have no success with textarea. The code looks like following fragment. $problem_val = mysqlclean($_SESSION,

Re: [PHP-DB] Page refresh and database updation

2006-09-26 Thread Brad Bonkoski
I'm sure there are many ways... a few off the top of my head. a). if there is some field or combination of fields that guarantee uniqueness then you can test for their existence before you insert. b). When you insert the first time set some session variable to something, and then don't insert

Re: [PHP-DB] posting information from a textarea

2006-07-06 Thread Brad Bonkoski
stripslashes should not be needed... if anything addslashes() may be needed if you have single quotes in the text area. I would say step 1 is to echo out your insert query to the page before you even excute the insert, to verify the query, and that you are getting the proper information from

Re: [PHP-DB] Select distinct field won't return distinct value

2006-06-06 Thread Brad Bonkoski
Perhaps you should fix your data model... but with your current set up, try: select cus_name, cus_id from customers group by cus_name order by cus_name asc -Brad Mohamed Yusuf wrote: I want select distinct field and return value of that field, but I have problem which is: select distinct

Re: [PHP-DB] odbc_exec error

2006-06-01 Thread Brad Bonkoski
Scott Wettstein wrote: I'm pretty new to PHP so I need help. I'm getting this error: Error in updating SQL PHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2., SQL state 07001 in SQLExecDirect in

Re: [PHP-DB] How can I get in PHP the number of files in a directory

2006-05-31 Thread Brad Bonkoski
http://www.php.net/manual/en/ref.dir.php suad wrote: Hi, This is for reading a file: ?php $handle = fopen(/home/rasmus/file.gif, r); ? How can I get in PHP the number of files in the directory (rasmus) and the files names in a loop? Thanks Suad -- PHP Database Mailing List

Re: [PHP-DB] allow-url-fopen setting

2006-05-31 Thread Brad Bonkoski
Manoj Singh wrote: Hello all, Can i change the allow-url-fopen(php.ini variable) setting through php code. If any one knows how to do that, please help me. Regards Manoj http://www.php.net/manual/en/ref.filesystem.php from manual Note: This setting can only be set in php.ini due to

Re: [PHP-DB] Combining Fields

2006-05-31 Thread Brad Bonkoski
Grae Wolfe - PHP wrote: Good Day! I am trying to use my limited knowledge to create a VERY simple process to display some of the information in my table, allow a particular record to be selected, then opened on a page with text boxes to edit the information, after which the UPDATE command

Re: [PHP-DB] Combining Fields

2006-05-31 Thread Brad Bonkoski
for wach record ;-) -Brad Brad Bonkoski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Grae Wolfe - PHP wrote: Good Day! I am trying to use my limited knowledge to create a VERY simple process to display some of the information in my table, allow a particular record

Re: [PHP-DB] MySQL/PHP Left Join Question

2006-05-25 Thread Brad Bonkoski
Some good examples of how to deal with this in PHP have already been given, especially the associative array solution. The question I have is with something like this, how do you weight out the pros/cons of code development versus speed? i.e. for code development breaking the logic up into 2

Re: [PHP-DB] MD5, MySQL, and salts

2006-04-17 Thread Brad Bonkoski
This begs the question of what would this method buy you over MD5? Some people have issue with like passwords looking the same with MD5 encryption, also a one way hash. But if you know the salt, then like passwords would also look the same, right? -B Giff Hammar wrote: For an example, look

Re: [PHP-DB] Manipulate an image automatically

2006-04-13 Thread Brad Bonkoski
query google about imagemagick tutorialsassuming you are using Linux... -Brad Henry Ortega wrote: What is the quickest way to manipulate an image? I have a 300x100 image of something (template), and I want text to be inserted to that graphic at a certain coordinate (e.g. lower right), how

Re: [PHP-DB] session

2004-10-17 Thread Brad Bonkoski
I believe you need to pass the session variable along to the next page... Something like: On page 1: if session is set { $s = SID; echo a href=\page.php?$s\Link/a; } - Original Message - From: H. J. Wils [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 17, 2004 9:38 AM

Re: [PHP-DB] session

2004-10-17 Thread Brad Bonkoski
the SID trhough the url-paramters is harming the security, am i right? From: Brad Bonkoski [EMAIL PROTECTED] To: H. J. Wils [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] session Date: Sun, 17 Oct 2004 09:46:06 -0400 MIME-Version: 1.0 Received: from pb1.pair.com ([216.92.131.4

Re: [PHP-DB] Bar codes in PHP

2003-07-28 Thread Brad Bonkoski
CPT John W. Holmes wrote: PHP wouldn't have anything to do with it. Your barcode should fill in a text area on a web page, which is the submitted to a PHP file for processing. You'll need something client site to get the code from the scanner to the web page. You wouldn't really need a

Re: [PHP-DB] hi (php-SSH)

2003-07-28 Thread Brad Bonkoski
Well, SSH has a server which woudl answer your requests and a lient to initiate the session, I'm assuming you wish to emulate the client side to initiate the session, of course PHP is a server side language, so it's not adding up. I have seen a JAVA applet that will open in a web browser on the

Re: [PHP-DB] un-encrypting passwords

2003-07-28 Thread Brad Bonkoski
Typically in these systems you do not send them their password un-encrypted if they lose it because like you said, it is one way. Normally, you collect certain information to validate them, and then generate a new password to email them, so they can get it and once again reset their password if

Re: [PHP-DB] MD5()

2003-02-26 Thread Brad Bonkoski
md5() is a one-way encryption algorithm. So once they are encrypted, you cannot decrypt them. Just look at the md5() function on the php website. It has what you need to do. Of course if you eventually need these back in the clear, then md5 would not be a solution. -Brad Chris Payne wrote:

Re: [PHP-DB] mysql wildcard

2003-01-08 Thread Brad Bonkoski
Well, if that is your only condition, why not use: 'select * from offtime' as your query? I believe the % as a wildcard is standard SQL, so I would *think* it should work in mysql, have you tried it? -Brad Edward Peloke wrote: I have an query: select * from offtime where type='$type' then

Re: [PHP-DB] newbee in PHP-MySQL- help in relational tables

2002-12-15 Thread Brad Bonkoski
I would say, that MYSQL is a relational database, thus implying that tables would eb relational and this is a DB forum, so just shot, what's the problem? Phanivas Vemuri wrote: hi, I need to knwo if anyone had worked on a php interface for relational tables in MySql. I have a problem , would

Re: [PHP-DB] little question from beginner

2002-12-14 Thread Brad Bonkoski
Well, I would look at 2 possible problems: 1). Submit is an HTML input type, and I would try to avoid using it as a script variable just to make sure avoid confusion. 2). You may not have register_globals turn 'on' in your php.ini file. So, if the form method is POST, try: $_POST['submit']. Or

Re: [PHP-DB] database update question

2002-11-15 Thread Brad Bonkoski
If you wish to update all of them, then just eliminate the id condition. [EMAIL PROTECTED] wrote: I have a database with several hundred entries of file names that end with .pdf. I have converted all those docs to .zip, now I need to change all the entries in the database to .zip. I tried to

Re: [PHP-DB] Next N Interface

2002-09-30 Thread Brad Bonkoski
I did something like this with a photo gallery I made. The approach I took is the execute a query, get the number of rows, and divide that number by how ever many records I wanted on that page. Then that would give me the number of total pages I would have for my navigational links at the

Re: [PHP-DB] Next N Interface

2002-09-30 Thread Brad Bonkoski
That would actually work for just getting a certain number of records from a query, but you would have to execute another query to figure out the navigational links he said he wants on the bottom...like google has, 1 2 3 4 5 . So, when I attacked it I figured one query is better then two even

Re: [PHP-DB] Flush database

2002-09-27 Thread Brad Bonkoski
How about writting the IP address to the database with a timestamp, then when a matching IP address arrives you view the timestamp and if it has been more then a hour, they can view the page, which would force you to update the timestamp. Of course you would probably need to write a stand-alone

Re: [PHP-DB] Flush database

2002-09-27 Thread Brad Bonkoski
Sounds like we are all on similar pages with timestamping, but if you issue a delete query every time the page is viewed it could create some sub-par performance based on number of hits. i.e. if the site gets 100 hits in the first 10 minutes of operation, it would issue delete logic and queries

Re: [PHP-DB] Current row of query

2002-09-26 Thread Brad Bonkoski
oops... I meant: (if $i is odd) ... because $i would be the current index in the array. Brad Bonkoski wrote: why not this? $result = mysql_query(Select * from table'); $num_rows = mysql_num_rows($rows); for ($i=0; $i$num_rows, $i++) { $row = mysql_fetch_array($result

Re: [PHP-DB] Current row of query

2002-09-26 Thread Brad Bonkoski
- From: Brad Bonkoski [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 11:10 AM To: Patrick Lebon; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Current row of query oops... I meant: (if $i is odd) ... because $i would be the current index in the array. Brad

Re: [PHP-DB] Current row of query

2002-09-26 Thread Brad Bonkoski
it... $rowNum = 0; while ( $row = mysql_fetch_array($result) ) { $rowNum++; if ($rowNum % 2) { $bgCol = #EADBC6; } else { $bgCol = #EFE1CE; } echo ..; } Brad Bonkoski [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... why not this?

Re: [PHP-DB] SQL file,

2002-09-21 Thread Brad Bonkoski
Typically, it is a text file that has SQL in it. Like: CREATE DATABASE some_name ( ID int NOT NULL AUTO_INCREMENT PRIMARY KEY, NAME varchar(30), etc Usually they are used to store the database information, and can be used in many of the database systems. Within the database itself, there

Re: [PHP-DB] SQL file,

2002-09-21 Thread Brad Bonkoski
. I think for MySQL it is: mysql \i name_of_file and then that will step through the file executing the SQL statements. -Brad Bryan McLemore wrote: So I would send the file through with a sql query? -Bryan - Original Message - From: Brad Bonkoski [EMAIL PROTECTED] To: Bryan McLemore

[PHP-DB] Re: PhpMyAdmin's File Manager and apps

2002-09-11 Thread Brad Bonkoski
http://sourceforge.net/projects/phpmyadmin/ Russell Griechen wrote: Where are the downloads for these apps? Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] PHP Editor?

2002-09-06 Thread Brad Bonkoski
1). vi (The best editor for any language, IMHO) 2). Yes Bryan McLemore wrote: First off, What html/php editor do you guys think is better? Secondly, perhaps a little more relevant to the database part of this. I just want to clarify that with mysql_query() I can send any valid sql

Re: [PHP-DB] Table formatting a link from a mysql query result

2002-09-05 Thread Brad Bonkoski
$variable_to_be_passed = 'some value'; echo tda href='some_page.php?variable=$variable_to_be_passed'I am a link/a/td; I think this should do it, not quite sure what you mean by wrappinga table cell in a anchor tag? Of course if you need to use the results of a database, this can be done too

Re: [PHP-DB] database result: tables with 2 coloumns

2002-09-05 Thread Brad Bonkoski
How's this? (MYSQL example) $query = select NAME from table_name; $result = mysql_query($query) or die(Invalid Query: $query); $num_rows = mysql_num_rows($result); $counter=1; echo table border=1tr; //start of table for ($i=0;$i$num_rows; $i++) //loop through the number of records {