[PHP-DB] time slots and PHP/MySQL

2002-08-21 Thread Matthew Crouch
this is a big question and i'm not trying to get you to do my modelling for me, but if anyone has experience with this i'd appreciate being pointed in the right direction: How could one efficiently manage time slots in a dB? I mean for example telling the dB that Mike can be somewhere at 6:15

[PHP-DB] Re: MySQL query from multiple tables

2002-07-04 Thread Matthew Crouch
it sounds like you may be serializing your SQL, in which case the following link might help. http://www.ashleyit.com/rs/jsrs/select/php/select.php Matthew Nock wrote: Hi All, I have a strange query which I need to build - I have looked at the JOIN and aliasing functions of mySQL but not

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

2002-06-24 Thread Matthew Crouch
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 (?!) Note: it does this (#2) even if I type in the URL with a

[PHP-DB] what the heck? update

2002-06-24 Thread Matthew Crouch
I changed method to GET and the value of $lastname seems to be getting passed but so is $submit, with the value Search for Last Name as you might expect. Probably this ain't the answer Matthew Crouch wrote: this bit from my index page is giving me 2 headaches: 1. it isn't passing anything

[PHP-DB] got it, thanks

2002-06-24 Thread Matthew Crouch
Seth Yount wrote: in you print statement you have ?lastname=%s, shouldn't that be '$s' denoting a variable being passed? Try that out. gl -- Seth 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

[PHP-DB] brand new elementary question

2002-06-24 Thread Matthew Crouch
got my other one sorted out; thanks everyone. now: how do i get it so when you hit enter on the keyboard it's the same as hitting the submit button with the mouse? When I hit enter, it clears my form and reloads the current page. -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] thanks

2002-03-31 Thread Matthew Crouch
i think i got this solved; sorry about the non-php question but there isn't a mysql newsgroup that i know of. Matthew Crouch wrote: Here's an easy one that I can't find laid out for me anywhere: I want a self join that pairs up the id numbers of a table in every permutation e.g. i have id

[PHP-DB] mysql joining 101

2002-03-30 Thread Matthew Crouch
Here's an easy one that I can't find laid out for me anywhere: I want a self join that pairs up the id numbers of a table in every permutation e.g. i have id #s 1, 2, and 3 i need this result: 1 2 1 3 2 1 2 3 3 2 3 1 clear enough? -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] easy date format question

2002-03-01 Thread Matthew Crouch
should be simple as pie, of course, but i can't find a straightforward syntax example in the documentation i'm trying to change the PHP date format to mysql's my code: $today = date(MMDD); $sql = INSERT into table (date) values ('$today'); and so on is filling the date field with zeros,

[PHP-DB] Re: FW: PHP Question on MySQL grouping

2002-03-01 Thread Matthew Crouch
Another way is to set a testing variable and then print an hr if it changes (this off the top of my head, probably bugs in it but you get the idea) while $myrow=mysql_fetch_row($result) { if $myrow[dishtype]$test { echo hr; //here you would print the rest of the info about the dish from the

[PHP-DB] answered my own question

2002-03-01 Thread Matthew Crouch
for anyone else who needs it: http://wwwphpbuildercom/snippet/downloadphp?type=snippetid=356 Matthew Crouch wrote: should be simple as pie, of course, but i can't find a straightforward syntax example in the documentation i'm trying to change the PHP date format to mysql's my code

[PHP-DB] Re: Retreiving data from a table

2002-03-01 Thread Matthew Crouch
i'm guessing you use mysql, so you can use the mysql_insert_id to retrieve the most recent addition, then select on it $newid=mysql_insert_id(); $sql=select [the auto_increment field] from table1 where id='$newid'; Does that help? Morten Nielsen wrote: Hi, I got the following insert

[PHP-DB] Re: Add and Subtract

2002-03-01 Thread Matthew Crouch
my guess is you've got a double-quote problem like that other guy ? $query=SELECT bank_points FROM wt_users WHERE uid={$session[uid]}; ends after the [ because of the double quote Jennifer Downey wrote: Hi All, Would someone please help me with the following code? I am trying to make

[PHP-DB] request and response objects?

2002-01-30 Thread Matthew Crouch
basically a yes or no question my brother wants me to ask: Does PHP support these objects? If not, Can they be faked? -- 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

[PHP-DB] Re: parse error

2001-12-13 Thread Matthew Crouch
you haven't shut your script with the ? before starting your HTML, near as I can figure it Rob Day wrote: I've written a small script that processes a form from a webpage and sends the submitted data as an HTML e-mail that has the form all filled out already. I've gotten smaller versions of

Re: [PHP-DB] Re: parse error

2001-12-13 Thread Matthew Crouch
your line 357 doesn't appear to have its semicolon... Rob Day wrote: Sorry for not giving enough info. This is right in the middle of the script. I do have the opening and closing tags. It must ne something else. -Original Message- From: Matthew Crouch [mailto:[EMAIL PROTECTED

[PHP-DB] Re: Dynamically populating a dropdown box

2001-12-13 Thread Matthew Crouch
I'm no expert, and my code is probably buggy, but I think this is the gist of it: select name=color ? $result = mysql_query(SELECT * from colors); while ($myrow = mysql_fetch_array($result)) { printf(option value=%s%s/option, $myrow[colorid], $myrow[colorname]); } ? /select Chris Payne wrote:

[PHP-DB] Re: SQL problem is killing this newbie

2001-12-12 Thread Matthew Crouch
You need an associating table; members and movies are in a many-to-many relationship here. The associating table represents the act of viewing-a-movie, and describe who and what are involved comme ca: members memberid, name 1 Fred 2 Jack 3 Jill movies movieid, title 1 Fear and loathing 2

[PHP-DB] Re: sorry...probably too easy

2001-12-05 Thread Matthew Crouch
solved my own problem. if anyone else needs it, the function is substr($string, firstposition, number) http://www.devshed.com/Server_Side/PHP/StringTheory/page4.html Mateo The Db Guy wrote: i'm fairly new to php, and thank you in advance for helping. is there a function that will extract the