Re: [PHP-DB] Forms Question

2001-09-05 Thread Steve Cayford
On Wednesday, September 5, 2001, at 04:50 PM, Jeff Grossman wrote: Hello, Here is the code I have: while ($row=mysql_fetch_array($result)) { $store=$row[store]; $jobdesc=$row[jobdesc]; echo FORM METHOD=post ACTION=update.php; echo PStore: Select NAME=\$store\

Re: [PHP-DB] Table Search ... HELP

2001-09-06 Thread Steve Cayford
All the info you want should be in $result after the query. But to get it out of $result you need to access one row at a time with mysql_fetch_array($result), which returns a numerically keyed array (if I remember correctly), or mysql_fetch_assoc($result), which returns a string keyed array or

Re: [PHP-DB] Query construction

2001-09-19 Thread Steve Cayford
Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to

Re: [PHP-DB] MySQL Query Weirdness

2001-09-20 Thread Steve Cayford
When you use mysql_fetch_array you're actually retrieving an array with two copies of the value you're looking for. One is indexed by the column number and one indexed by the column name. So it looks like you're looping through them both and printing each out. You might want mysql_fetch_assoc

Re: [PHP-DB] PHP and MySQL queries...

2001-10-25 Thread Steve Cayford
Yep, MySQL has DATE, DATETIME, and TIMESTAMP field types. You can order by them and everything. -Steve On Thursday, October 25, 2001, at 09:18 AM, Tim Foster wrote: I'm new to this list, to PHP and to MySQL (been doing VBScript on ASP for several years, tho). I'm curious... If you're

Re: [PHP-DB] PHP and MySQL queries...

2001-10-25 Thread Steve Cayford
Oop. I guess I missed the point of that question. Still, the MySQL manual says a DATE takes 3 bytes, DATETIME 8 bytes, and TIMESTAMP 4 bytes. That seems fairly efficient. Using an INT for a date might actually take up more space. -Steve On Thursday, October 25, 2001, at 09:34 AM, Steve


2001-10-25 Thread Steve Cayford
You only need to post your question once, and you really shouldn't cross-post to multiple lists...please, I just got six copies of your question. Did you compile php with the --enable-dbase configure flag? You can check with phpinfo() for what's enabled and also what configuration flags were

Re: [PHP-DB] Help! ¡Ayuda!

2001-10-26 Thread Steve Cayford
Source code- CÛdigo fuente: ? $based=articulo.dbf; if (($descriptor=dbase_open ($based, 0))==0){ printf (brError al abrir la base de datos); }else{ printf (brBase de datos abierta); $num_registros=dbase_numrecords($descriptor); $num_campos=dbase_numfields($descriptor);

Re: [PHP-DB] Learning PHP Sessions

2001-10-31 Thread Steve Cayford
This is really off-topic for this list, but... From my understanding of sessions, you really don't want session_start() in an if{} block. Every time you hit this script, it will have no memory of any session variables until you call session_start(). -Steve On Tuesday, October 30, 2001, at

Re: [PHP-DB] losing first row of an array

2001-11-02 Thread Steve Cayford
On Friday, November 2, 2001, at 01:09 PM, Seany wrote: having this code running PHP4.0b2 $result = mysql_query(SELECT AS clubacid, clubac.club_id, clubac.ac_year, clubac.ac_type, FROM clubac, club WHERE = '$club_id' AND clubac.club_id =; $row =

Re: [PHP-DB] question

2001-12-12 Thread Steve Cayford
On Wednesday, December 12, 2001, at 09:03 AM, Robert Weeks wrote: Hi, I'm a little stumped here, maybe I haven't had enough coffee yet... Anyway, I have a lot of SQL queries that return one row if there is a match and instead of having to write out something like this: $firstname

Re: [PHP-DB] A weird images database/web page problem

2002-01-17 Thread Steve Cayford
Hello again. On Thursday, January 17, 2002, at 01:06 AM, chip wrote: On Wednesday 16 January 2002 08:57 pm, Steven Cayford banged out on the keys: On 2002.01.16 19:59:37 -0600 chip wrote: Let's tackle the first one first - OK. On Tuesday 15 January 2002 10:20 pm, Steven Cayford banged

Re: [PHP-DB] elseif statement syntax

2002-03-20 Thread Steve Cayford
You probably have error reporting turned off in your php.ini file or you may be directing errors into your log file, try checking there. Why are you tacking or die(mysql_error()) on the end of each of your query assignments? You're just assigning a string to a variable so there's nothing to

Re: [PHP-DB] Images on MySQL

2002-03-29 Thread Steve Cayford
I keep hearing this from people (not to store images in mysql), but I would like to hear a bit more about why. Mysql has blob fields, so it seems perfectly reasonable to use them, doesn't it? I'm storing some images in a database and what's attractive to me about it is that I can put the

Re: [PHP-DB] Using include file

2002-04-12 Thread Steve Cayford
information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. Steve Cayford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Just a guess: Are you doing the include from a

Re: [PHP-DB] Arrays

2002-04-15 Thread Steve Cayford
Your $eventdate variable is an array, not a string so you can't just drop it into an sql query string like that. If you have separate fields in the db for year, month and day then you probably want something like: $query = insert into ... values ( ... , '$eventdate[0]', '$eventdate[1]',

Re: [PHP-DB] cron job and php

2002-04-16 Thread Steve Cayford
Where is your php binary? (try which php) The command path under crontab is not always the same as in a login shell, so you might need to spell it out like: */10 * * * * /usr/local/bin/php /home/harpreet/crontest.php -Steve On Tuesday, April 16, 2002, at 12:17 PM, Harpreet Kaur wrote:

[PHP-DB] odbc versions

2002-04-17 Thread Steve Cayford
Hi. I'm looking at compiling one of the odbc function sets into php on my Mac OSX machine (I eventually want to be able to talk to MAS90 on a Windows machine -- if that's feasible). I'm finding the ODBC situation a bit confusing though. Should I use iodbc or unixodbc? Any suggestions? And

Re: [PHP-DB] Date of Birth From Form

2002-04-19 Thread Steve Cayford
A combination of strtotime() and date() can make this easy. date(Y-m-d, strtotime($birthday)) Or see docs and comments at -Steve On Friday, April 19, 2002, at 01:29 PM, Brandon Paul wrote: Hey all, I have a credit application form, and

Re: [PHP-DB] what the heck? (elementary question)

2002-06-24 Thread Steve Cayford
On Monday, June 24, 2002, at 01:52 PM, Matthew Crouch wrote: this bit from my index page is giving me 2 headaches: 1. it isn't passing anything into the URL 2. the page that gets called (name.php) sits and tries to load forever. it looks like it's even filling up my hard drive with data

Re: [PHP-DB] header function

2002-07-15 Thread Steve Cayford
What's on line 3 of Auth_user.php ? If you have anything outside of the ?php ... ? tags it will start the html output. Even just an empty line. -steve On Monday, July 15, 2002, at 04:09 PM, Mohammad Forouhar-Fard wrote: Hi, I have a problem with function header(Location:xy.php?var=2).

Re: [PHP-DB] or statement in url

2002-07-18 Thread Steve Cayford
How about[]=1FooID[]=2 Then FooID will be an array of the values. -Steve On Thursday, July 18, 2002, at 03:20 PM, Matthew K. Gold wrote: can I use an OR operator in a variable that is passed through a url? ex. how can I combine the following two lines so

Re: [PHP-DB] what's wrong with this ereg?

2002-08-20 Thread Steve Cayford
Well, one thing is you've got mismatched parentheses. You need another another opening paren right after the if. Also, don't you need to escape the last hyphen in your character sets? As well as the . before the third character set? -Steve On Tuesday, August 20, 2002, at 11:11 AM, [EMAIL

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Steve Cayford
You could put it anywhere. Stick it in a text file somewhere, fopen() and read the file for the password. Or keep it in a php script outside of the web root if that's the issue, then just include() it when you need to. Of course any file you put it in will have to be readable by whatever user

Re: [PHP-DB] Insert path string into Mysql

2002-11-18 Thread Steve Cayford
On Monday, November 18, 2002, at 01:10 PM, Alan Kelly wrote: $path = 'c:\\demo\\' ; $query = insert into PH_PHOTO (PHOTO_PATH) VALUES ('$path'); $result=mysql_query($query); I would guess that the backslashes are being interpreted once by php when the variable $path is interpolated into the


2002-12-30 Thread Steve Cayford
Some suggestions... On Monday, December 30, 2002, at 03:55 PM, Nikos Gatsis wrote: where showpict.php: $query=SELECT pict FROM pict WHERE pro_id= '$pro_id; (You're missing an end ' there, but apparently that's not the problem) $result=mysql_db_query($database, $query, $conn) or Die


2002-12-31 Thread Steve Cayford
On Tuesday, December 31, 2002, at 02:25 AM, nikos wrote: Steve   b. the _type is the type of the binary data. From the PHP manual read: $userfile_type - The mime type of the file if the browser provided this information. An example would be image/gif Ok, but it didn't look like you saved

Re: [PHP-DB] HTML tags in auth.php script

2003-01-10 Thread Steve Cayford
Check out the auto_prepend configuration option here: I believe you can do this on a per-directory basis, but haven't tried it. -Steve On Friday, January 10, 2003, at 02:56 PM, [EMAIL PROTECTED] wrote: ThX John...One other