[PHP-DB] RE: [PHP] Problems w/ goto

2010-12-17 Thread Jay Blanchard
[snip]
Thank you with your excellent help in the past.  Here is another
puzzler

I am trying to write a program that can have two(2) independent forms 
in one PHP file.  When I run the code below [from PHP - A Beginner's 
Guide], to which I have added a second form, it freezes.  Without the 
goto statements, it runs.  When it does run, it displays both forms 
on one Web screen. What I desire is for the first form to be 
displayed, the data entered and then the second form displayed.  In 
an actual, not test program like this one, the data in the second 
form would be dependent on the first form.

What did I do wrong?
[/snip]

You used GOTO. 

In this case I would recommend using something like jQuery to 'hide' one
form until the other form is complete. PHP has sent the output to the
browser already, both forms are there and display when you remove the
GOTO. 

GOTO should never be used like this.

GOTO should never be used.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] auto creation of email IDs

2009-12-16 Thread Jay Ess

Vinay Kannan wrote:

Hey Guys,

I've been at this for couple of days now, and have no clue where to start,
and was almost thinking about scrapping the project, It would be great help
if anyone can give me some advice, or guide me in the right direction.

I have a portal, where users would come in and register and create an
account, as soon as an account is created, I want to be able to auto create
an email ID for them, the server would be Linux, any ideas on how this can
be done.
  

What is an email id?
Do you want to create a unique ID depending on the users email that can 
be identified only by you?

Then i guess you want to look at hashing (md5,SHA-X...) + salt.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP] Sample script files with 3 different select boxes with mysql conditions in select boxes

2008-01-03 Thread Jay Blanchard
[snip]
I have a table with the below fields. (id, title, language, author 
link to the book).

Initially I want to display a page with 3 select boxes (language,
author  title).

Initially first select box displays the available language by querying
the database. On selecting one language, author select box should show
the matching records from the database. After selecting the author,
matching records should display in title.

Could any body send the sample script files with 3 select boxes?
[/snip]

There are several examples here
http://www.google.com/search?hl=enq=populating+select+boxes

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Sum function for multiple recordsets?

2007-12-24 Thread jay
I'm getting a health insurance quote engine going...

http://www.insuranceshoppers.net/getquotes/short-term-health.php

... it sends me an email with the info, and enters the info into a leads 
table in mysql.
   
  Then I want to have it show the rates (on a new page using $_GET) from a 
table I have setup with the rates of multiple companies. Since the rates are 
based on age and gender and it could be 1 or 2 people plus the possibility of 
adding children (the total rate is just the sum of each persons individual 
rate), I've been working on making a recordset for the primary applicant, the 
spouse, and children and telling it to add them together. (that seems like the 
easiest way, but I'm a newbie)

My question: is there a php function or a way I can create the 3 recordsets in 
Dreamweaver and tell it to just add them up and display the results in a repeat 
region? And is this even the best way to approach it?
   
  Cheers,
   
  Jay


[PHP-DB] RE: [PHP] MySQL Identifying worst-performing codes

2007-10-04 Thread Jay Blanchard
[snip]
There is  a tool call idera (SQL diagnostic manager). Basically it is a 
performance monitoring and diagnostics tool. 
It has a feature;  

Identifying of worst-performing codes - 
Identifies performance bottlenecks such as the worst-performing stored 
procedures, long-running queries, most frequently run queries, SQL Statements 
and SQL batches
http://www.idera.com/Products/SQLdm/Features.aspx 

I'm looking for a same like tool for MySQL. Is anyone have any  ideas.
[/snip] 

Have you thought about asking this on the MySQL list?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] is this a problem ?

2004-12-28 Thread Peter Jay Salzman
On Tue 28 Dec 04, 11:44 AM, Miles Thompson [EMAIL PROTECTED] said:
 
 At 09:25 AM 12/28/2004, amol patil wrote:
  hallo,
  
  i have changed file   signup1.php with login1.php, in action fied of form
  
  form name=form1 method=POST action=--
  
  and saved .
  
  but when i run this file and click on submit button,  it still shows old 
  sighnup1.php. and data is also not entering in database. while it data was 
  entering in databse  before this. but not now with this change.
  
  no error shown. only shows previous page and no data entry


 There are scores of examples / tutorials on this. Google turned up 6,070 
 hits on this expression:
 
 add user php mysql example
 
 Here's one of them, although it assumes register globals is on
 
 http://www.php-scripts.com/php_diary/072000.php3
 
 Why don't you pick one, work with it and adapt it to your needs.
 
 However, why is your form's action parameter set to a string of hyphens?
 
 Regards - Miles Thompson
 

Agreed.  Also, you'd get *much* better replies to your request for help if
you read this:

   http://www.catb.org/~esr/faqs/smart-questions.html
 
Sometimes it's very difficult to ask a good question, and I think esr breaks
his own rule (volume is not precision), but he says all the right things,
and has some excellent advice.

This isn't meant to be a put-down or a joke.  Most people think that asking
a question absolves them of thinking.  Like a quick-fix.  On the contrary,
asking a good question can be a lot of work.

Respectfully,
Pete

-- 
The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's Fearful Symmetry

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Site optimization

2004-12-28 Thread Peter Jay Salzman
On Tue 28 Dec 04, 12:11 PM, Joseph Crawford [EMAIL PROTECTED] said:
 i was wondering this as well :D
 
 are there any tools out there to simulate high traffic on your web
 server say where you specify how many users hit the site at one time
 and the tool actually hits your server that many times?
 
Is this what you're looking for?

http://www.linuxjournal.com/article/6691

Pete

-- 
The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's Fearful Symmetry

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Update keeps failing with php/sqlite

2004-12-27 Thread Peter Jay Salzman
Hi all,

I made a toy database.  Two tables are students (a collection of student
info) and message (private messages I want individual students to read).
The message table is indexed by a student's social security number.

student
   last, first, ssn, address, city, state, zip, email

message
   msg1, ssn


I'm trying to update msg1, unsuccessfully.  Everything *seems* to go
perfectly.  The $_POST variables exist and hold what I think they should
hold, the SQL looks OK.  I checked the sqlite website, and UPDATE is
indeed supported.  I've been scratching my head a lot over this one:


The given code is (note My_Header() and My_Footer() just interject a little
HTML, like html and the like):




// We picked the class and student.  Now display the current message.
//
if ( isset($_REQUEST['action'])  $_REQUEST['action'] == 'editmsg' )
{
$handle = sqlite_open($_SESSION['dbfile'])
or die(Could not open database.);

$query = SELECT msg1 FROM message  .
WHERE ssn = ' . sqlite_escape_string($_POST['ssn']) . ';

$result = sqlite_query( $handle, $query );

if ( sqlite_num_rows($result)  0 )
$msg = sqlite_fetch_single($result);
else
$msg = '';


My_Header(Messages);

?
form method=post action=? echo $_SERVER['PHP_SELF']; 
??action=submitedit
textarea name=msg cols=40 rows=8
? echo +$msg+ ?/textarea
pinput type=hidden name=ssn value=? echo $_POST['ssn'] 
?/p
pinput type=submit value=Edit/p
/form

?

My_Footer();

exit(0);
}



// If we're here, it's because we want to update the message in the
// database.  This performs the SQL using UPDATE.
//
if ( isset($_REQUEST['action'])  $_REQUEST['action'] == 'submitedit' )
{

$handle = sqlite_open($_SESSION['dbfile'])
or die('Error in query: ' .
sqlite_error_string(sqlite_last_error($handle)));

$query = UPDATE message  .
SET msg1 = ' . sqlite_escape_string($_POST['msg']) . '  .
WHERE ssn = ' . sqlite_escape_string($_POST['ssn']) . ';


sqlite_query($handle, $query)
or die('Error in query: ' .
sqlite_error_string(sqlite_last_error($handle)));

Header(Location:  . $_SERVER['PHP_SELF'] . ?action=chose);
exit(0);
}

?



Anything wrong with this code?  I've tried to write as defensively as I can.

Thanks!
Pete

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to process a query form with CHECKBOX Please help

2004-12-27 Thread Peter Jay Salzman
On Mon 27 Dec 04,  5:22 PM, S Kumar [EMAIL PROTECTED] said:
 Dear group, 
  I am a novice programmer started doing php to process
 a query form of my patients.  
 
 I have a database and one table in it deals with my
 patient information.  Depending on their condition I
 divided their age groups into 3 categories. In my
 database a table patient_data has a column age_group
 and a patient can be any one of young, middle or old
 category.   
 Now the possibility is that a user can selecct 1 or 2
 or all three options.
 
 In the query form, I gave the option for a user as a
 check box. The piece of html code is as below:
 
 DIVAge group/DIV
 DIVYounginput type=checkbox name=
 value=/DIV
 DIVMiddleinput type=checkbox name=
 value=/DIV
 DIVOldinput type=checkbox name= value=/DIV
 
 Problem:
 I want to capture the user options and create an SQL
 statement:
 
 Select age_group from patient_data where age_group =
 young and old ; 
 
 
 I am truly stuck here. Can any one please help me out
 to pass this situation. 
 
 Thank you in advance.
 
 Kumar. 
 


It seems as though the SQL itself is pretty straight forward.  The where
clause would be generated from a conditional based on what values are true.

Exactly what are you having difficulty with?

Pete

PS- How can a single patient be young, middle, and old at the same time?  
Are you
   a psychologist?

-- 
The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's Fearful Symmetry

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to process a query form with CHECKBOX Please help

2004-12-27 Thread Peter Jay Salzman
On Mon 27 Dec 04,  9:22 PM, p p said:
  
  Select age_group from patient_data where age_group =
  young and old ; 
  
  
  I am truly stuck here. Can any one please help me out
  to pass this situation. 
  
  Thank you in advance.
  
  Kumar. 
  
 PS- How can a single patient be young, middle, and old at the same
 time?  Are you a psychologist?

Sorry.  There should have been a smiley :-) after that sentence.

Pete

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] How to process a query form with CHECKBOX Please help

2004-12-27 Thread Peter Jay Salzman
On Mon 27 Dec 04,  8:48 PM, S Kumar [EMAIL PROTECTED] said:
 Hello Pete:
 
 However, in the case of checkboxes, I do not know how
 to make variables out of them depensing on what user
 selects.  Say whatever user cheks in the checkbox,
 that variable has to be searched in TABLE-C and
 various other columns in that table.  I am totally
 clueless how  I can capture what user checks as a
 variable and incorporate into the SQL statement. 
 
Hi Kumar,

I've never played with databases before 3 or 4 days ago, and maybe played
around with HTML forms a couple of times in my life.  I'm still learning the
basics of SQL, so if you don't know something about SQL, I almost certainly
don't know it!

However, if all you need to know is how to access checkboxes in PHP... that
I've played around with.  I wrote a sample program, check.php.

Sorry for the painfully obvious comments, but I wrote them for me just as
much as for you.  :)  I tried to write it as defensively as I know how, but
like I said, I'm just learning this stuff myself.  Hope it's OK!   :)

You should be able to generalize this to more than one set of checkboxes,
but if not, let me know and I'll whip up another sample program.  Basically,
all the magic is in the name= parameter in the input tag.  Use the same
name for things that related options.  Use different names for different
groups of checkboxes (but put them all within the same form tag.

Note: I just realized that I used a for loop.  I recall reading somewhere
that foreach is more efficient than for, so that may be one way to improve
this.  Anyhow, here it is.

HTH,
Pete




!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN';
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html
head
titleCheckboxes With PHP Example/title
/head


body

form action=? echo $_SERVER['PHP_SELF'] ??action=posted method=post
input type=checkbox name=mycheckbox[] value=? echo date(l); 
?/Choice 0br/
input type=checkbox name=mycheckbox[] value=hello/Choice 1br/
input type=checkbox name=mycheckbox[] value=2.3827/Choice 2br/
pinput type=submit/p
/form

?

// This checks to see if the submit button was hit.
//
if ( ! isset($_REQUEST['action']) )
exit(0);


// The checkbox group with name foobar[] can be accessed
// by $_POST['foobar'].  As always, $_POST is an array, so
// the thing that we assign $_POST to is also an array, which
// can be counted, indexed, foreach'ed, etc.
//
// If nothing was checked, the $_POST['mycheckbox'] array doesn't
// exist, which will print a warning if we set E_ALL on.  So let's
// check to see if it exists first, and if not, tell the user to
// check something.
//
if ( ! isset($_POST['mycheckbox']) )
die(I'm going to sit back and wait until you check something!);



$mycheckbox = $_POST['mycheckbox'];

echo 'ul';

for ($i=0; $i  count($mycheckbox); $i++)
{ 

// This shows you how to access checkboxes in PHP.  Now that you have a
// list of all the stuff that's been checked, you can use a whole bunch
// of conditional statements to form your complex SQL.
//
echo limycheckbox[$i]: $mycheckbox[$i]/li; 

}

echo '/ul';


?

/body
/html

-- 
The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's Fearful Symmetry

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Undefined indicies

2004-12-26 Thread Peter Jay Salzman
Slightly off topic, I apologise.

Total newbie.  In many php DB tutorials I've seen, it's recommended to set
register_globals off, and error reporting to E_ALL.

When I looked at my system, register_globals was enabled and error reporting
was set to E_FATAL.  I changed them to the suggested values (off and E_ALL),
and all hell broke loose.  Clearly, I must not be very good at PHP yet.  ;)

First question:

register_globals is a matter of security, so that's definitely valuable to
turn off.  Is setting error reporting really useful if my aim is to become a
better PHP programmer?

I'm thinking along the lines of lint/splint, where this line of code in C:

   printf(hello world\n);

generates a useless warning because I'm not using printf()'s return value.
I'm wondering whether it's useful for a scripting language, like PHP, to
warn me when I use code like:


   if ( $_REQUEST['action'] == 'foo' )
  do_something;


when I don't access the URL with a ?action=foobar type request.

Should I change error reporting back to E_FATAL or is being this
compulsive about warnings good for me (and my security)?



Second question:

If being compulsive is good for me, what's the best way of handling
something like above?   From browsing php.net, I've thought of a few ways,
like a controlled suspension of compulsion:


   if ( @ $_REQUEST['action'] == 'foo' )
  do_something;

or, lord forbid:

   if ( isset($_REQUEST['action'])  $_REQUEST['action'] == 'foo' )
  do_something;

and also variations on a theme:

   if ( array_key_exists('action', $_REQUEST )
  $action = $_REQUEST['action'];

   if ( isset($action) )
  do_something;


Personal preference must play into this, but I'm wondering what more
experienced PHP programmers do.  My code is riddled with this kind of thing.

Thanks (and sorry for the long winded / slightly off-topic post!)

Pete

-- 
The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's Fearful Symmetry

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] php4 + sqlite - quoting stuff

2004-12-25 Thread Peter Jay Salzman
Hi all,

I'm a kinda-sorta newbie to php -- I basically just futz around with it
because it's pretty cool.

However, I'm brand spanking new to databases.  Never did anything with them.
I taught myself a little SQL because it looked fun to learn, but I just
thumbed through some books.  I never really used a database in earnest.  Too
difficult to set up, and my dual Celeron 333 is underpowered as it is
without having an extra daemon running.

Yesterday, I taught myself sqlite + perl, and that was a LOT of fun.  But
then I remembered I hate using perl for CGI, so today I started messing
around with sqlite for php4.

There's something I'm not groking about php's syntax.  When I look at how
you're supposed to quote stuff in sqlite for php4:

sqlite_query( $handle, 
INSERT INTO course VALUES (
' . sqlite_escape_string($termcode). ',
' . sqlite_escape_string($semester). ',
' . sqlite_escape_string($course)  . ',
' . sqlite_escape_string($course_desc) . ',
' . sqlite_escape_string($college) . ',
' . sqlite_escape_string($reference)   . '
)
) or die(Error bravo in query:  .
sqlite_error_string(sqlite_last_error($handle)));

it makes me want to cry.  Php should be prettier than Perl, not uglier.  We
have single quotes, double quotes and a string quote function.

How am I supposed to parse this?  What's the purpose for all this quoting?

And is there a _nicer_ way of doing this?

Thanks!
Pete

PS- I don't want to count out the possibility that some of my values have
quote characters in them.

-- 
The mathematics of physics has become ever more abstract, rather than more
complicated.  The mind of God appears to be abstract but not complicated.
He also appears to like group theory.  --  Tony Zee's Fearful Symmetry

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP] Missing mysql_real_escape_string() function in PHP 4.3.4

2004-02-10 Thread Jay Blanchard
[snip]
I'm trying to move a PHP application that was originally built on the
windows PHP implementation to a newly installed Fedora FC1 Linux system.
However the Fedora implementation of PHP 4.3.4 seems to be missing the
mysql_real_escape_string() function.  I suspect that there might be
other
mysql functions missing as well - so I would appreciate your advice on
how
to get this new system up to speed with all of the latest PHP 4.3.x
extensions. 
[/snip]

Here are all of the available mysql functions, each has its version
listed on the appropropriate page.

http://us4.php.net/manual/en/ref.mysql.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP] Changing case

2003-11-12 Thread Jay Blanchard
[snip]
The problem is if someone enters aa-1234 and the other items in the
quote are FF-2345 and QQ-3456 then the aa-1234 is UNDER them, instead of
on top.
[/snip]

http://www.php.net/strtoupper

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP] keyword searching

2003-11-12 Thread Jay Blanchard
[snip]
I am selecting a field in a database called description for keyword 
searching.  The field contains names of people, states, years, etc.
When 
someone searches for say holmes north carolina the query searches for 
exactly that, fields which have holmes north carolina, and not fields 
that contaim holmes, north, and carolina.  So I run a str_replace to 
replace all spaces with *, which turns it into holmes*north*carolina, 
but say that north carolina is before holmes in the field, it won't
return 
those fields (it only returns fields in which holmes is infront of north

carolina).  So how can I have it return all fields which contain all 
the words holmes, north, and carolina in any order, in that field?
[/snip]

You don't say which database you are using, but several allow for full
text searching of fields where the order is inconsequential. The
behaviour you describe is preceisely how most (if not all) databases
will return a search on a standard column type.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP]{Semi-OT} keyword searching

2003-11-12 Thread Jay Blanchard
[snip]
I'm using Informix SQL.  Do you know how to do full text searching on 
Informix?  If so, please share the details :)
[/snip]

You will have to consult your Informix documentation in order to discern
if full-text features are available. Usually the text column where the
information is being held has to be set to the 'full-text' type.

You could fake this with PHP by taking your search terms and shuffling
them, but this requires performing the query several times with shuffled
requests.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: [PHP] php|cruise - do unto others...

2003-10-20 Thread Jay Blanchard
[snip]
PayPal a contribution to [EMAIL PROTECTED]
[/snip]

Fabulous idea Ed, I wish I'd a thunk it for me. At the risk of seeming
ignorant (same risk I run each day by just getting out of bed) how
exactly do I PayPal a contribution to [EMAIL PROTECTED]? I have
made Paypal contributions before, but I've never seen (to my
recollection) one done directly before.

Thanks!

Jay

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread jay
to find out if an array is empty use:
empty()

it must be unset
NULL returns false
0 returns false
it must be truly empty to return true...



 Ok... well
 
 When I select the select product which has a option value= it tells
 me the count is one (1). If I select an ACTUAL product it tells me
 one(1) was select.. if I select two ACTUAL products it tells me two (2)
 products were selected.
 
 For SOME reason it doesn't seem to be recognizing that the option
 value= is empty!
 
 
 Any more ideas??
 
 *sigh*
 
 Aaron
 
 -Original Message-
 From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
 Sent: February 5, 2003 4:03 PM
 To: 'Aaron Wolski'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] checking for empty array from a form field?
 grrr!
 
 What about:
 
 count($arrayname)
 
 Should tell you how many items are in an array.
 
  -Original Message-
  From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 05, 2003 4:04 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] checking for empty array from a form field?
  grrr!
 
 
  Argh 
 
 
  HOW does one check for an array being empty from a form
  field??
 
  Tried a billion different things and NOTHING works
 
  I've tried:
 
  if ($products == \n) {
 
  echo hello;
  }
 
  else {
 
  echo bye;
 
  }
 
 
  if ($products == ) {
 
  echo hello;
  }
 
  else {
 
  echo bye;
 
  }
 
 
 
  if (empty($products)) {
 
  echo hello;
  }
 
  else {
 
  echo bye;
 
  }
 
 
  if (!isset($products)) {
 
  echo hello;
  }
 
  else {
 
  echo bye;
 
  }
 
 
  if (count($products) == 0) {
 
  echo hello;
  }
 
  else {
 
  echo bye;
 
  }
 
 
  NOTHING works!!!
 
  Any help.. puuulease?
 
  Aaron
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] php and db/c

2003-01-03 Thread jay
Hello everyone,
We are running an old database system called db/c and attempting to access 
the information via php. We have managed to make an odbc connection to the 
databases, and can successfully retrieve the field names, and field counts. 
However, php insists the tables are empty, returning -1 (empty set) for the 
odbc_num_rows(). When we make a raw odbc connection to run a direct sql query 
on the data, it all shows up fine. There is some miscommunication between odbc 
and php that is eluding us. Any input or suggestions would be welcomed.
Thank you,
Jay Merritt
[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Stress Test Script?

2002-09-25 Thread Jay

Does anyone have a good php script that will test (i.e. benchmark) my MySQL
machine and my Web server?

Thanks!


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup Texas PHP Users

2002-08-01 Thread Jay Blanchard

Well, the predictions have come true. In San Antonio only four folks signed
up for the meetup, and the event was cancelled with no way to get in touch
with the other local developers to make a go of it. Out of the 147 cities
listed only 15 had enough people for meetup.com to do their thing. A noble
idea, but ...

I want to encourage developers to farm PHP developer groups in their own
communities. Some may find that their community already has a users group (a
list is available at http://www.phpusergroups.org) although some of these
groups are not really groups at all, just people looking to form groups.

If you live in the San Antonio area I would be glad to be the
chief-wrangler-whats-in-charge for just such a group. Please contact me
directly. I am also working on a Texas PHP Developer Conference at the
beautiful T Bar M Resort  Conference Center in New Braunfels, Texas
sometime between January and April of 2003. I have begun contacting
potential speakers and hope to have people who wish to present papers at the
conference as well as do some other fun activities such as a high or low
ropes course, golf, tennis, etc. All suggestions and admonitions are
welcome. Everyone in Texas is invited to contact me so that I can dispurse
further information. Also, my contact at T Bar M says, The more, the
cheaper ...  as discounts for larger groups are available. Heck, even if
you don't live in Texas but would be interested in attending drop me a line
and I'll keep you up to date.

Thanks!

Jay

It’s as bad as you think, and they are out to get you.

***
* *
* Texas PHP Developers Meeting*
* Spring 2003 *
* T Bar M Resort  Conference Center  *
* New Braunfels, Texas*
* Interested? Contact;*
* [EMAIL PROTECTED] *
* *
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup Texas PHP Users

2002-07-31 Thread Jay Blanchard

[snip]
First of all, sorry for the additional cross post. MeetUp.com lacks the
ability to let you contact other folks who have signed up. In my general
area, Massachusetts, there are a bunch of tiny groups scattered about,
and I'd like a chance to get all of them to converge in one place to make
the meetup worth it for all of us. I know there's only a few days before the
meetup is to take place, but if folks from the following areas could email
me, then we can try and work out somewhere we can all meet, instead of there
being 5 groups of 2 or 3 people.
[/snip]

Agreed Gabriel, meetup.com, while a nice idea, does not work well at all due
to the lack of contact information provided. But look what it may have
started!

I encourage PHP developers to seek each other and form their own groups. But
even the PHP lists barely scratch the surface of developers who are out
there. Contact other computer users groups in your area and you may be
surprised at what pops-up.

Jay

LOTTERY: A tax on people who are bad at math

***
* *
* Texas PHP Developers Meeting*
* Spring 2003 *
* T Bar M Resort  Conference Center  *
* New Braunfels, Texas*
* Interested? Contact;*
* [EMAIL PROTECTED] *
* *
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area

2002-07-15 Thread Jay Blanchard

[snip]
No, it's not a dating service :)
Want to meet other PHP developers in your area? Check out:

http://php.meetup.com/

Pretty nifty idea... especially given the lack of user groups in the U.S.

I thought for others who had not seen this I would post this. There is
probably already a user group in your area if you live near a major city.
According to the PHPusergroups.org web site
[http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user
groups in 52 countries.
[/snip]

I have seen some users groups mentioned, which is outstanding. PHP Meetup is
gaining lots of ground with 105 members at last check. Top 5 cities are...

Manhattan (below 42nd St) (5 members)
London, England (4 members)
Ann Arbor, MI (3 members)
Melbourne (3 members)
Washington DC (3 members) [actually tied with Philadelphia, PA and Orange
County, CA]

And I finally saw another San Antonio member. Just want to keep this fresh
in everyone's mind. If you know of other developer lists where php is
discussed please forward this along.

Thanks!

Jay

Do not meddle in the affairs of dragons-for you are crunchy and good with
ketchup



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area

2002-07-12 Thread Jay Blanchard

No, it's not a dating service :)
Want to meet other PHP developers in your area? Check out:

http://php.meetup.com/

Pretty nifty idea... especially given the lack of user groups in the U.S.
[/snip]

I thought for others who had not seen this I would post this. There is
probably already a user group in your area if you live near a major city.
According to the PHPusergroups.org web site
[http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user
groups in 52 countries.

Jay

Chaos, panic  disorder…my work here is done!



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: [PHP] dumping only selected records into another table

2002-06-11 Thread Jay Blanchard

[snip]
I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?
[/snip]

RTFMySQLM

http://www.mysql.com/doc/I/N/INSERT_SELECT.html

HTH!

Jay

It's hip to snip!
Give a man a program, frustrate him for a day.
Teach a man to program, frustrate him for a lifetime.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: [PHP] Ho to write output of sql query to txt file?

2002-06-04 Thread Jay Blanchard

[snip]
I am trying to get only records out of a table mathing a query. This should
be piped into a textfile. My problem is that I have to transmit this records
to a new machine. So the output should be a kind of sql commands which I
could run with phpadmin or similar to import them to the other db on the
other machine.

Is this possible?
[/snip]

from: http://www.mysql.com/doc/S/E/SELECT.html

The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected
rows to a file. The file is created on the server host and cannot already
exist (among other things, this prevents database tables and files such as
`/etc/passwd' from being destroyed). You must have the file privilege on the
server host to use this form of SELECT. SELECT ... INTO OUTFILE is mainly
intended to let you very quickly dump a table on the server machine. If you
want to create the resulting file on some other host than the server host
you can't use SELECT ... INTO OUTFILE. In this case you should instead use
some client program like mysqldump --tab or mysql -e SELECT ...  outfile
to generate the file. SELECT ... INTO OUTFILE is the complement of LOAD DATA
INFILE; the syntax for the export_options part of the statement consists of
the same FIELDS and LINES clauses that are used with the LOAD DATA INFILE
statement. See section 6.4.9 LOAD DATA INFILE Syntax. In the resulting text
file, only the following characters are escaped by the ESCAPED BY character:
The ESCAPED BY character
The first character in FIELDS TERMINATED BY
The first character in LINES TERMINATED BY
Additionally, ASCII 0 is converted to ESCAPED BY followed by 0 (ASCII 48).
The reason for the above is that you must escape any FIELDS TERMINATED BY,
ESCAPED BY, or LINES TERMINATED BY characters to reliably be able to read
the file back. ASCII 0 is escaped to make it easier to view with some
pagers. As the resulting file doesn't have to conform to the SQL syntax,
nothing else need be escaped. Here follows an example of getting a file in
the format used by many old programs.
SELECT a,b,a+b INTO OUTFILE /tmp/result.text
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ''
LINES TERMINATED BY \n
FROM test_table;

HTH!

Jay



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: [PHP] Ho to write output of sql query to txt file?

2002-06-04 Thread Jay Blanchard

[snip]
I did read on mysql.com and your article. Than I tryed to transfer the
datasets.
Export worked ok. The textfile contains the records.
Import message:
Query OK, 35 rows affected (0.04 sec)
Records: 35  Deleted: 0  Skipped: 0  Warnings: 630

The warning already tells it. the datasets are totally empty. Only default
of the columns is set.
[/snip]

Did you remember to add a field seperator? That seems the likely cause of
the problem.

Jay



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] what version of Oracle does php_oci8.dll support?

2002-03-17 Thread Jay Glanville

Good morning all.

I'm a relative newbie to PHP, not to mention Oracle, and I need some help
trying to get the two to talk together.

My first question is in the subject: what version of Oracle does the
php_oci8.dll library support?  8.0.x? 8.1.x? 8i?

The reason that I'm asking is because I setup a new installation of PHP (v.
4.1.2) to use Apache (v. 1.3.20) and talk to Oracle (v. 8.0.6).  (Just for
completeness, my OS is win2000, sp 2.)  If I use the php_oracle.dll,
everything works fine.  However, the moment that I include the
extension=php_oci8.dll directive in the php.ini file, I get the following
error when I start my Apache service:
The procedure entry point OCILobClose could not be located in the
dynamic link library OCI.dll

Does this mean I can't use the php_oci8.dll functionality?

Thanks.

--
Jay Dickon Glanville


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Newbie Question

2001-11-08 Thread Jay Fitzgerald

Ok, I am still fairly new at PHP and MySQL also, so please bear with me.


TASK: I have a client that wants to have job openings listed on their site 
and they want to be able to add, edit and delete the postings themselves. I 
would do this in flat-file format but there is the risk of that file size 
getting too large and slowing down the server.


SOLUTION: I have created a MySQL database that will hold all the postings 
in a table called 'jobs' and have created a PHP form that will post this 
jobs into the db.

PROBLEM: When I go to the PHP form and enter all of the pertinent job 
information, there is one specific field that will have to have carriage 
returns/line breaks in it between paragraphs. Everything is working except 
for this. Is there a way whenever the user presses ENTER, that either 
PHP/MySQL will convert this into a BR tag only when being displayed in a 
browser and not in the db??


Can anyone out there please help me with this? I am available off-list as 
well if it will be easier to pass code back and forth. Any assistance is 
greatly appreciated!



Should you have any questions, comments or concerns, feel free to call me 
at 318-338-2034.

Thank you for your time,

Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A
==
Bayou Internet..(888) 
30-BAYOUhttp://www.bayou.com
Mississippi Internet...(800) 
MISSISSIPPI...http://www.mississippi.net
Vicksburg Online..(800) 
MISSISSIPPIhttp://www.vicksburg.com
==
Tel: (318) 338-2034ICQ: 38823829 Fax: 
(318) 323-5053


-- 
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]




Re: [PHP-DB] RE: [PHP] Newbie Question

2001-11-08 Thread Jay Fitzgerald

Ok.I have it working half-way now.here is what I have so far:


===
PHP FORM (add_jobs.php - submits to the script below):

FORM METHOD=post ACTION=do_addjobs.php
TEXTAREA NAME=duties COLS=30 ROWS=10 WRAP=virtual/TEXTAREA
INPUT TYPE=submit VALUE=Add Job
/FORM
===


===
PHP SCRIPT (do_addjobs.php - inserts into db)

?
if ((!$duties))
{
header(Location: add_jobs.php);
exit;
}

$sql = INSERT INTO jobs (duties) values ('$duties');
$connection = mysql_connect(localhost, , ) or die (Couldn't 
connect to the server.);
$db = mysql_select_db(, $connection) or die (Couldn't select the 
database.);
$sql_result = mysql_query($sql) or die (Couldn't execute query.);

echo BDuties:;
echo nl2br ($duties);
echo /B;

?
===



With the way I have this above, when it does echo nl2br ($duties); it 
displays fine now -- thanks for that help so far -- but the problem now 
(this may be normal, but I am not sure) is when I connect to the db and 
select * from jobs; the db is writing the entries like this:


===
mysql select * from jobs;
++--+--++-+-+--+--++--+
| id | position | opendate | salary | appdate | 
duties  | examples | training | skills | benefits |
++--+--++-+-+--+--++--+
|  1 | test | test | test   | test| 1
2
3

4
5
6


7
8
9 | test | test | test   | test |
++--+--++-+-+--+--++--+
===


is this in fact normal?


Jay


-- 
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]




[PHP-DB] Update Query?

2001-10-01 Thread Jay Paulson

Hello-
I'm trying to run an update query in an application I'm making.  I keep
getting a MySQL error however when I try and print out the mysql_error()
nothing is returned.  I run the same query in phpMyAdmin and the query runs
fine.  Below is the update query I'm running and the php code that I'm using
to build it.  Any suggestions?

update news set newsOrder=2 where station_id=5 and id=3

$query = update news set newsOrder=.$order. where station_id=$stationid
and id=.$orderNewsID;

thanks,
jay


-- 
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]




[PHP-DB] Last Modified question..

2001-08-28 Thread Jay Paulson

I have a problem... I want to check the last modified time that a file was
changed/updated.  Actually, it's an employee database that I'm working on
and I thought about just checking the last modified date on the file that
the information was stored on.  However, I get a permission denied error and
I don't want to change the permissions of the file.  Is there an easy way to
check to see when the last time anyone logged in and updated their
'employee' information?

Thanks,
jay


-- 
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]




Re: [PHP-DB] Last Modified question..

2001-08-28 Thread Jay Paulson

A) It's a MySQL database that I'm using
B) I'm using file_exsist() and to check the modified date I'm using
filemtime()
C) If I modify the permissions on the file wouldn't that possibly cause some
security issues?

Thanks,
jay

- Original Message -
From: Justin Buist [EMAIL PROTECTED]
To: Jay Paulson [EMAIL PROTECTED]
Cc: PHP DB list (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 4:44 PM
Subject: Re: [PHP-DB] Last Modified question..


 a)  What kind of database is this?
 b)  use fstat() to check the modification time on a specific file.
 c)  You will have to modify permissions so that the user your web server
 runs as has 'read' permission on the file if you want to use fstat().

 Justin Buist
 Trident Technology, Inc.
 4700 60th St. SW, Suite 102
 Grand Rapids, MI  49512
 Ph. 616.554.2700
 Fx. 616.554.3331
 Mo. 616.291.2612

 On Tue, 28 Aug 2001, Jay Paulson wrote:

  I have a problem... I want to check the last modified time that a file
was
  changed/updated.  Actually, it's an employee database that I'm working
on
  and I thought about just checking the last modified date on the file
that
  the information was stored on.  However, I get a permission denied error
and
  I don't want to change the permissions of the file.  Is there an easy
way to
  check to see when the last time anyone logged in and updated their
  'employee' information?
 
  Thanks,
  jay
 
 
  --
  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]
 



-- 
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]




Re: [PHP-DB] restoring mysql db after mysqldump

2001-08-22 Thread Jay Paulson

actually the owner of the tables/files that all_databases.sql creates is
mysql.mysql.. and it still says read only.. and they are chmod'ed to 660...
like i said before i'm really lost as to why it's doing this.

jay

- Original Message -
From: Brunner, Daniel [EMAIL PROTECTED]
To: 'Jay Paulson' [EMAIL PROTECTED]
Cc: PHP List (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 12:24 PM
Subject: RE: [PHP-DB] restoring mysql db after mysqldump


 Hello!!!


 Make sure that the ownership of the files are

 mysql.mysql


 This as happened to me too!!!


 I might be wrong but it worked for me



 Dan


  --
  From: Jay Paulson
  Reply To: Jay Paulson
  Sent: Wednesday, August 22, 2001 11:29 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: [PHP-DB] restoring mysql db after mysqldump
 
  Hello everyone-
 
  I have done the mysqldump function and got the db in a
  all_database.sql
  file.  Now I am running this command at the shell prompt of my Linux
  machine:
 
  mysql -u root -p -e 'all_databases.sql'
 
  When I do that it works fine until it starts to insert the information
  into
  the database.  I get the error that the table it is trying to read the
  information into is 'read only'... Is there anyway around this
  problem?
 
  Thanks,
  Jay
 
 
  --
  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]
 
 



-- 
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]




[PHP-DB] MySQL ERROR 1036: Table 'foo' is read only

2001-08-22 Thread Jay Paulson

Running on RH, Apache. I had this working on Win2K, then switched to Linux
by running the mysqldump then moving over the dump file and runing the
mysql -u root -p  'add_databases.sql'.  It creates the database then the
table and then it tries to populate the table and i get an ERROR 1036: Table
'foo' is read only.  Anyone know why this is happening and or how to fix it?

Thanks,
Jay


-- 
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]




Re: [PHP-DB] restoring mysql db after mysqldump

2001-08-22 Thread Jay Paulson

I've checked and the ROOT user has access to everything... but still no
luck.. when i run the mysql -u root -p  'all_databases.sql' it gets to the
first table and tries to insert some information into it and says blah
table is read only and it stops...

jay

- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Jay Paulson' [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 12:18 PM
Subject: RE: [PHP-DB] restoring mysql db after mysqldump


 Are your privileges in MySQL set correctly?  If ROOT doesn't have
read/write
 access, the script will crash.

 rick

 -Original Message-
 From: Jay Paulson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 22, 2001 11:29 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP-DB] restoring mysql db after mysqldump


 Hello everyone-

 I have done the mysqldump function and got the db in a all_database.sql
 file.  Now I am running this command at the shell prompt of my Linux
 machine:

 mysql -u root -p -e 'all_databases.sql'

 When I do that it works fine until it starts to insert the information
into
 the database.  I get the error that the table it is trying to read the
 information into is 'read only'... Is there anyway around this problem?

 Thanks,
 Jay


 --
 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]

 --
 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]



-- 
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]




[PHP-DB] MySQL read only?

2001-08-22 Thread Jay Paulson

Anyone know why a MySQL table is set to read only?  I'm logged in as the
root user of MySQL and I have checked the privalages of the root user in the
MySQL table and everything is set to Yes and I'm able to add and delete
users in the MySQL table.

Here's what I did... I had a database on my Win2k machine and I just ftp'ed
those files over to MySQL running on RedHat.  I noticed that the permissions
of the files on the RedHat box were different than the MySQL database so I
changed the permissions on those files I ftp'ed over.  But to no evail it
still doesn't work correctly.

Would it make a difference if I was using a earlier version of MySQL on my
Win2k machine than on the RedHat machine?

Anyway, I'm at a total lost here so any help would be great!

Thanks,
Jay


-- 
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]




[PHP-DB] MySQL read only?

2001-08-21 Thread Jay Paulson

Hello everyone--

I keep getting an error with MySQL when I try to Update or Insert a record
into my database.  The error message is as follows:

MySQL said:  Table 'zone' is read only

I went and checked the files and set the permissions on them so that they
were read and write only but that didn't help.  I'm wondering if it's a
setting in MySQL.  Can someone point me in the right direction for getting
the Update and Inserting fixed?

Thanks!
Jay


-- 
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]




[PHP-DB] file() shooting blanks - importing fixed width file for use in MySQL

2001-05-06 Thread Jay Lepore

Hello,

I have an ASCII fixed width text file I'm trying to convert to an array of
fields.

When I use file() to place each line (record) in it's own array element, it
strips out any blanks it finds except one.  This results in in ABC
MOTORS becoming ABC MOTORS.  That creates a problem if ABC is in a fixed
width 5 character field and MOTORS is in its own field.

Any ideas on how to get file() to not shoot out my blanks would be
appreciated.

[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]




[PHP-DB] Connect to MySQL from different computer

2001-04-11 Thread Paulson, Joseph V. \Jay\

Hello-
I was wondering how do I connect to a MySQL database, using php, when php
and MySQL are on two separate computers?
Thanks,
Jay

-- 
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]




[PHP-DB] easy db question

2001-04-02 Thread Paulson, Joseph V. \Jay\

hello everyone-
I'm running MySQL 3.23.27-beta with php 4.04pl1.  What I am wondering is I
have an auto incrementing field and if I delete all the entries in the table
with this field the incrementing doesn't start over.  For example, if I
insert 6 records for the first time into this table the auto incremenator
gets set to 6 for the last position.  Now, if I go and delete all 6 of these
entries and then insert 6 more after the deletion the auto incrementing
starts off at 7 and goes through 12.  I'm just curious if there is a way
around this so that if all the records are deleted the auto incrementing
field will start back at 1.

Thanks,
Jay Paulson
Developer, Web Technologies
Viatel, Inc.
http://www.viatel.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]




[PHP-DB] simple sql question

2001-03-27 Thread Paulson, Joseph V. \Jay\

Hello-
I'm running MySQL and php and when I run the query below I don't get any
return rows.  As you can see I search for events that are happening between
a certain date.  The "startDate" field is type DATE in MySQL and the date in
the database that should be returned in "2001-03-27" but I'm not getting any
results.

select * from events where startDate='2001-03-01' and
startDate'2001-01-04'

Any help on what I could be doing wrong would be great!

Thanks,
Jay Paulson
Developer, Web Technologies
Viatel, Inc.
http://www.viatel.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]




[PHP-DB] installing MySQL with PHP4.0.3pl1

2001-02-13 Thread Paulson, Joseph V. \Jay\

Hello everyone-
I'm trying to get MySQL to work with php, however I'm running php on a WinNT
box and I was wondering if I needed to install MySQL in a specific location
on the hard drive?  The reason I as is that when I try to connect to a
database I create in MySQL in php it doesn't find any database.  I'm totally
lost on this and don't have a clue as what to do.  Any help will be greatly
appreciated.
Regards,
Jay

-- 
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]