RE: [PHP-DB] PHP and MSSQL

2003-12-31 Thread mayo
yes, it's possible. I'm learning php myself. (I'm a CF junkie.) I got this script from somewhere. I have the info on a backup CD at home. I'll post it if you're having problems with the script below. (I did a google for: ODBC connection mySQL, or something similar to that.) The script below is wh

[PHP-DB] php includes

2004-01-13 Thread mayo
I'm new to php (I've been in the CF world the last few years) and have a basic question regarding includes: On my dev box (a fancy term for laptop) I have the following include: This doesn't work on the client's site. There I have to use: I can't use relative links. So is there any trick t

RE: [PHP-DB] Re: php includes

2004-01-14 Thread mayo
Patrin [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 13, 2004 5:27 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Re: php includes > > > Mayo wrote: > > > I'm new to php (I've been in the CF world the last few years) > and have a > > basic qu

[PHP-DB] chmod on win xp

2004-01-17 Thread mayo
so I would like to write to file on my local box. I've looked but I don't see how to chmod. using: windows xp and iis 5 -- gil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] chmod on win xp

2004-01-17 Thread mayo
are you wanting to > "chmod" the file attributes? > (with a script or in general?) > > -Original Message- > From: mayo [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 17, 2004 2:17 PM > To: php > Subject: [PHP-DB] chmod on win xp > > so

[PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
I'm a cold fusion refugee and am having incredible problems with something that I think is relatively easy -- so I must be missing something basic. I would like to pull info from a query string and use it inside a database call. I can pull the query string into a general variable: now I would

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
ds to be a default value set: // setting the default variables if(!isset($order)){$order="ASC";} Unfortunately its not working :( thx, gil > -Original Message- > From: Micah Stevens [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 21, 2004 1:59 PM > T

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
my bad: I typed in the script and forgot the echo. -- gil > -Original Message- > From: Rick Dahl [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 21, 2004 2:28 PM > To: mayo; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] using query_strings in sql > > &g

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
;classCost"] . "\n"; echo ""; } echo ""; } $title = "XXX: Administration: List Classes"; ?> .hide { background-color: #

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
> something, at least printing out the html heading information. > Try looking at > the page source for errors as well. Change the query to include the or > die(mysql_error()); code because the script might be dying with > a SQL error > and you just aren't seeing

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
brother that was it at least as far as putting a query_string variable into a sql statement. thx I'll have to see how it works regarding if-else clauses -gil > -Original Message- > From: Matt Matijevich [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 21, 2004 3:53 PM >

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread mayo
> Try adding: > > extract($_GET) > > in the code before the function gets called. That's not a very > secure method, > but it will prove whether or not that's the problem. > > -Micah > > > On Wed January 21 2004 12:43 pm, mayo wrote: &g

RE: [PHP-DB] editing, deleting records

2004-01-23 Thread mayo
Add a table cell with a link to the page processing the edit/del example print ("EDIT"); > print("" . $lname . "" . $fname . "" > . $dob . "" . $phone . "" . $address > . "" . $email . "" . $sex . ""); > print(""); > } This will send the us

[PHP-DB] FW: db design - which is better

2004-02-07 Thread mayo
-Original Message- From: Gilbert Midonnet [mailto:[EMAIL PROTECTED] Sent: Saturday, February 07, 2004 5:09 PM To: php-db Subject: db design - which is better I have a client who has hundreds of articles. Each article can be seen by one or more permission groups. I have questions regard

RE: [PHP-DB] FW: db design - which is better

2004-02-07 Thread mayo
, putting-his-foot-in-his-mouth, Gil > -Original Message- > From: Ignatius Reilly [mailto:[EMAIL PROTECTED] > Sent: Saturday, February 07, 2004 5:33 PM > To: mayo; php-db > Subject: Re: [PHP-DB] FW: db design - which is better > > > Use the second design. S

RE: [PHP-DB] FW: db design - which is better

2004-02-07 Thread mayo
> -Original Message- > From: Ignatius Reilly [mailto:[EMAIL PROTECTED] > Sent: Saturday, February 07, 2004 6:01 PM > To: mayo; php-db > Subject: Re: [PHP-DB] FW: db design - which is better > > > There are perhaps such times, but I have yet to meet one

RE: [PHP-DB] FW: db design - which is better

2004-02-07 Thread mayo
L PROTECTED] > Sent: Saturday, February 07, 2004 6:31 PM > To: mayo; php-db > Subject: Re: [PHP-DB] FW: db design - which is better > > > Hmmm... > > What of maintenance? > One day your pointed-headed boss asks you to add a "civility" field > (Mr|Mrs|Co

[PHP-DB] sql, problem with join and presentation

2004-02-15 Thread mayo
Currently I display a list of classes. Simplified SQL and display below: SELECT * FROM classes WHERE classCategory='$Category' AND classDeleted=0 ORDER BY $order $reorder The presentation is: +--+--++ | CLASS TITLE | LOCATION | CLASS CODE

[PHP-DB] problems with spam

2004-02-16 Thread mayo
Has anybody else been getting spammed with penis and breast enlargeners to their listserv email? I use [EMAIL PROTECTED] solely for listservs and in the past week I've started getting 5-10 spams a day. Gil Midonnet -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

[PHP-DB] sql, grouping problem

2004-02-16 Thread mayo
I'm trying to group the output of a query. I can do it with cold fusion but cannot figure it out using php. Currently I display a list of classes: +--+--++ | CLASS TITLE | LOCATION | CLASS CODE | +--+--++ | CLASS

RE: [PHP-DB] sql, grouping problem - THX

2004-02-17 Thread mayo
Thank you John, That did the trick. Gil > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Monday, February 16, 2004 9:46 PM > To: mayo > Cc: php-db > Subject: Re: [PHP-DB] sql, grouping problem > > > mayo wrote: >

[PHP-DB] sql injection attack, protection from

2005-05-16 Thread mayo
I'm new to PHP and would like to make certain that I have the basic protection for the site: Use double quotes to contain variable Use mysql_escape_string so that query is considered part of the WHERE clause. $result=mysql_query('SELECT * FROM users WHERE username="'.mysql_escape_string($_GET['

[PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
I would like to get the itemID number (autoincrement) of the last insert. (Insert order, get last orderID number and use it elsewhere.) I'm having trouble understanding how to do a transaction in mysql/php Code below: $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error conne

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
y 17, 2003 1:30 PM To: 'mayo' Subject: RE: [PHP-DB] multiple queries, one transaction You could always use $orderId = mysql_insert_id($result) to pull the autoinc id that was created from your insert statement... But I think your question revolves more around "how do I do a query&qu

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
ure if one query fails. It's a BEGIN and COMMIT statement. mysql_query("BEGIN"); // starts the transaction mysql_query("COMMIT"); // ends the transaction I'm just not certain how it's used. Thx -Original Message- From: Jason [mailto:[EMAIL PROTEC

RE: [PHP-DB] multiple queries, one transaction - REWORDED

2005-05-20 Thread mayo
ID 1. The solution I've been using is to DELETE FROM purchaseItems WHERE orderID = '789' Now I have to reinsert. INSERT INTO purchaseItems ... These multiple queries (DELETE and INSERTS) should be considered one transaction so that if one query fails, they all do. Thx, mayo

[PHP-DB] printf() in a variable, or alternative to printf()

2005-05-26 Thread mayo
"% 4d",$orderID[0]); does not work in $thisContent=" "data" . "moredate" . "evenmoredata" . "; In effect I need the output of printf() to be placed inside a variable and I don't see how to do that. Str_pad(), of course, does not work. Thx for any hints. mayo

[PHP-DB] printf() in a variable, or alternative to

2005-05-27 Thread mayo
"% 4d",$orderID[0]); does not work in $thisContent=" "data" . "moredate" . "evenmoredata" . "; In effect I need the output of printf() to be placed inside a variable and I don't see how to do that. Str_pad(), of course, does not work. Thx for any hints. mayo

[PHP-DB] write to file, difficulty inputting data

2005-05-31 Thread mayo
I'm writing customer orders into a file. I'm 1. getting data from session variables and a database, 2. putting it into a variable called $fileContent 3. then touch($filename); 4. then writing $fileContent to $filename - the code is at the bottom The test versions of this have all gone well.

[PHP-DB] FW: write to file, difficulty inputting data

2005-05-31 Thread mayo
SORRY everyone, posted to wrong list I'm writing customer orders into a file. I'm 1. getting data from session variables and a database, 2. putting it into a variable called $fileContent 3. then touch($filename); 4. then writing $fileContent to $filename - the code is at the bottom The tes

[PHP-DB] Heads Up! Virus on the list?

2001-01-29 Thread Chuck Mayo
Hello all, I don't run the firewall or the virus protect at corporate, but the firewall just sent me this mail. Not being the mail admin, I'm not sure exactly what it means, but take it for what it's worth, I guess. (I removed our corp domain from the text below)

[PHP-DB] VIRUS IN "i need help with odbc!"

2001-01-29 Thread Chuck Mayo
Virus in this mail? Angel2 Gabriel Lena Valega wrote: > -- Virus Warning Message (on the network) > > Found virus TROJ_NAVIDAD.E in file Emanuel.exe > The file is deleted. > > - > > ---

[PHP-DB] No security on mySql database - help!

2001-02-04 Thread Chuck Mayo
After spending the last two weeks feverishly learning and coding php & mySql, I'm ready to go live and have discovered that my Hostpro Virtual Server (Used to be Vservers? never mind...) "doesn't support password-protecting individual databases". I thought it strange that I didn't need any user/pa

Re: [PHP-DB] No security on mySql database - help!

2001-02-04 Thread Chuck Mayo
Not trying to write an ad here, but Hostpro is a company that rents server space and lets me serve multiple domains out of my space. I went with them to save money, and because they offer tons of goodies, SSI, CGI, PERL, PHP, mySql, shell & CRON access, unlimited email accounts with aliases and vi

Re: [PHP-DB] No security on mySql database - help!

2001-02-04 Thread Chuck Mayo
e tutorials. www.thickbook.com - chapters 15-17 deal with > authorization, cookies and sessions. and the last chapters 20-22 all use > sessions in the examples. > > Have any good books, URLS's that you read to get started? I am looking > for a > good mySQL book, I haven't he

[PHP-DB] Table locking to prevent duplicate inserts?

2003-10-10 Thread Mayo, Chuck
y the same results. Anyone have a clue what's going on here, or better still... how the heck to make these threads play nice? Thanks Chuck Mayo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] argh! still not able to get my variables

2003-10-10 Thread Mayo, Chuck
Shiloh, I'm kind of a latecomer here, but on my system, this works: COUNTY ID: $county_id\n"; } else { } print "No County ID\n"; ?> 17089 9 Can't think why you wouldn't be able to access that value unless you're accidently clearing it before checking it. If you're trying to access $coun

[PHP-DB] Table locking to prevent duplicate inserts?

2003-10-20 Thread Mayo, Chuck
exactly in unison. Anyone have a clue what's going on here, or better still... how the heck to make these threads play nice? Thanks Chuck Mayo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Table locking to prevent duplicate inserts?

2003-10-21 Thread Mayo, Chuck
thanks again for the help. I'll be able to fix this app and will incorporate your suggestions into my work in the future. Chuck > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Monday, October 20, 2003 11:32 AM > To: Mayo, Chuck > Cc: