Showing image
If I save the image name in the database, I can call it that way. BUT when the file is uploaded, it saves the whole path in the database (ie C:\Path1\Path2\filename.jpg). How do I break that up to make it save just filename.jpg and not the whole path? Thanks, Dawn http://www.rdcss.com/ - RD Computer Solutions http://wow.cooncheese.com/ - WOW.CoonCheese.com http://dpenguin.rdcss.com/ - Cornucopia Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL with perl error
The error log says, Can't call method do: on an undefined value. . . But the EXACT SAME code works on another script I'm running. I don't see any reason for it to suddenly have a problem. What does this error message MEAN? Code Snippet-- # Form was okay; get image type and contents and create new record. # Use REPLACE to clobber any old image with the same name. $mime_type = uploadInfo ($image)-{'Content-Type'}; ($full, $thumb) = read_image_file ($image); $dbh-do (REPLACE INTO image (name,listing_id,image,thumbnail,mime_type) VALUES(?,?,?,?,?), undef, $name, $listing_id, $full, $thumb, $mime_type) or bail_out(There's a problem with the upload); -End Snippet--- http://www.rdcss.com/ - RD Computer Solutions http://wow.cooncheese.com/ - WOW.CoonCheese.com http://dpenguin.rdcss.com/ - Cornucopia Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL 'locking up'
Occasionally, MySQL seems to lock up on the Linux box and just sit there. It did it today for three hours before we realized it. When this happens, the only thing we know of to do is restart it, and this time it wouldn't shut down so we had to reboot the Linux box. Does anyone have any idea what causes this and what we can do to keep it from happening in the future? It's not a good thing when our customers who use MySQL databases suddenly can't access them. Thanks, Dawn H http://www.rdcss.com/ - RD Computer Solutions http://wow.cooncheese.com/ - WOW.CoonCheese.com http://dpenguin.rdcss.com/ - Cornucopia - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FW: FW: FW: HELP! functions don't work...
-Original Message- From: Les Roberts [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 17, 2001 9:06 PM Cc: Dawn H Subject: Fwd: FW: FW: HELP! functions don't work... first I apologize for the bad function name... I had changed it to several and left it at dayname() which, as you noted, is not valid. But monthname(), which is valid, fails exactly the same way. note the page http://65.108.143.207 says: Fatal error: Call to undefined function: monthname() in /home/ccrb/ccrb-www/index.html on line 7 and the code printf(test for jon... monthname is %s,monthname(2001-06-17)); Again, I apologize. Nothing is worse than asking for help and not getting the supporting evidence right. -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 17, 2001 2:38 PM To: Dawn H Subject: RE: FW: HELP! functions don't work... On 17-Jun-01 Dawn H wrote: -Original Message- From: Les Roberts [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 17, 2001 9:29 AM To: [EMAIL PROTECTED] Subject: HELP! functions don't work... please pass along to anyone who might help... If you look at http://65.108.143.207/ you'll see I get the following error: Fatal error: Call to undefined function: dayname() in /home/ccrb/ccrb-www/index.html on line 8 This indicates that I'm missing most all of the functions. Is there a standard include that I need, or is my php installation not complete? Here is the line of code in question: ?php printf(test for jon... dayname is %s,dayname(2001-06-17)); localhost.dread$ pwd /usr/local/share/doc/apache/phpmanual localhost.dread$ grep dayname * localhost.dread$ There isn't a PHP function 'dayname', date(), strftime(). mktime() are what you are looking for. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Display error but continue script
How do I make an error display, but still continue the script? The error subroutine does not exit, but the original subroutine that calls it doesn't continue after the error message, it just quits. =Dawn H http://www.rdcss.com/ - RD Computer Solutions http://wow.cooncheese.com/ - WOW.CoonCheese.com http://dpenguin.rdcss.com/ - Cornucopia Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Display error but continue script
I'm using Perl -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of MikemickaloBlezien Sent: Saturday, June 16, 2001 2:06 PM To: Dawn H Cc: [EMAIL PROTECTED] Subject: Re: Display error but continue script On Sat, 16 Jun 2001 13:47:29 -0500, Dawn H [EMAIL PROTECTED] wrote: What scripting are you using, PHP, Perl, etc?? How do I make an error display, but still continue the script? The error subroutine does not exit, but the original subroutine that calls it doesn't continue after the error message, it just quits. =Dawn H Mike(mickalo)Blezien Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Tel: 1(225) 686-2002 = Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Display error but continue script
Ah. The subroutine bail_out() that I'm using is using die. Aha! :-) Thanks, =Dawn -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 16, 2001 2:39 PM To: Dawn H Cc: MySQL Email List Subject: RE: Display error but continue script On 16-Jun-01 Dawn H wrote: I'm using Perl are you displaying your message with warn() or with die() ? Filter fixer: database,sql,query -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Inserting without knowing . . .
Got the code below, an excerpt anyway. I need to be able to insert each of the rooms without knowing ahead of time which rooms are going to be chosen. Line 10, they choose their rooms. Line 41, they list their room size. How do I pull the info out that's input in Line 41 and insert it into the database? I have a limited number of room names, but some houses don't have some rooms, so the list won't be the same every time. I'm sure there must be an easy way to do this but I'm at a loss. Thanks in advance. =Dawn H ---CODE 1 print h3('Submit a Property, Page Three - Select Your Rooms'), 2 start_form; 3 print table( 4 TR( 5 td('Your listing ID number is'), 6 td(hidden(-name='id',-value=$id),$id), 7 ), 8 TR( 9 td('What rooms does your house have? '), 10 td(checkbox_group(-name='rooms',-value=['Living','Dining','Kitchen','Break fast','Study','Master','Bedroom2','Bedroom3','Bedroom4','Bedroom5','Bedroom6 ','Bonus','Laundry','Family','Great','Loft','Other'])), 11 ), 12 TR( 13 td({-colspan='2',-bgcolor='maroon'}, 14 submit(-name='action',-value='Describe Rooms (Next)'), , 15 submit(-name='action',-value='Cancel')), 16 ), 17 ), 18 end_form; 19 } 20 21sub describe_rooms { 22 $id=param('id'); 23 my $room; 24# print The rooms paramater holds: ,param('rooms'),br; 25 my @rooms=param('rooms'); 26 print hidden(-name=rooms,-value=@rooms); 27# print The rooms array holds: ,@rooms,br; 28 print h3('Submit a Property, Page Three - Describe Your Rooms'), 29 start_form; 30 print TABLE; 31 print TR; 32 print tdYour listing ID number is /TD; 33 print td; 34 print input type=\hidden\ name=\id\ value=\$id\; 35 print $id; 36 print /TD; 37 print /TR; 38 foreach $room(@rooms) { 39 print TR( 40 td('Dimensions of',$room,' '), 41 td(textfield(-name='$room',-size='30')), 42 ); 43 } 44 print TR( 45 td({-colspan='2',-bgcolor='maroon'}, 46 submit(-name='action',-value='Add_Pictures'), , 47 submit(-name='action',-value='Finish'), , 48 submit(-name='action',-value='Cancel')), 49 ); 50 print /TABLE; 51 print end_form; 52} -END CODE Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FW: Inserting without knowing . . .
Never mind, I got that part :-) Thanks anyway!! How do I make an error display, but still continue the script anyway? The subroutine does not exit, but the subroutine that calls it doesn't continue after the error message, it just quits. =Dawn H -Original Message- From: Dawn H [mailto:[EMAIL PROTECTED]] Sent: Monday, June 11, 2001 10:21 PM To: MySQL Email List Subject: Inserting without knowing . . . Got the code below, an excerpt anyway. I need to be able to insert each of the rooms without knowing ahead of time which rooms are going to be chosen. Line 10, they choose their rooms. Line 41, they list their room size. How do I pull the info out that's input in Line 41 and insert it into the database? I have a limited number of room names, but some houses don't have some rooms, so the list won't be the same every time. I'm sure there must be an easy way to do this but I'm at a loss. Thanks in advance. =Dawn H ---CODE 1 print h3('Submit a Property, Page Three - Select Your Rooms'), 2 start_form; 3 print table( 4 TR( 5 td('Your listing ID number is'), 6 td(hidden(-name='id',-value=$id),$id), 7 ), 8 TR( 9 td('What rooms does your house have? '), 10 td(checkbox_group(-name='rooms',-value=['Living','Dining','Kitchen','Break fast','Study','Master','Bedroom2','Bedroom3','Bedroom4','Bedroom5','Bedroom6 ','Bonus','Laundry','Family','Great','Loft','Other'])), 11 ), 12 TR( 13 td({-colspan='2',-bgcolor='maroon'}, 14 submit(-name='action',-value='Describe Rooms (Next)'), , 15 submit(-name='action',-value='Cancel')), 16 ), 17 ), 18 end_form; 19 } 20 21sub describe_rooms { 22 $id=param('id'); 23 my $room; 24# print The rooms paramater holds: ,param('rooms'),br; 25 my @rooms=param('rooms'); 26 print hidden(-name=rooms,-value=@rooms); 27# print The rooms array holds: ,@rooms,br; 28 print h3('Submit a Property, Page Three - Describe Your Rooms'), 29 start_form; 30 print TABLE; 31 print TR; 32 print tdYour listing ID number is /TD; 33 print td; 34 print input type=\hidden\ name=\id\ value=\$id\; 35 print $id; 36 print /TD; 37 print /TR; 38 foreach $room(@rooms) { 39 print TR( 40 td('Dimensions of',$room,' '), 41 td(textfield(-name='$room',-size='30')), 42 ); 43 } 44 print TR( 45 td({-colspan='2',-bgcolor='maroon'}, 46 submit(-name='action',-value='Add_Pictures'), , 47 submit(-name='action',-value='Finish'), , 48 submit(-name='action',-value='Cancel')), 49 ); 50 print /TABLE; 51 print end_form; 52} -END CODE Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Using more than one table
I have four tables, and I want to use bits of each one to display a list on one page. I tried listing what I wanted out of each, but it seems that if any one of the fields chosen is null, the whole row with that ID# is left out. I thought perhaps a LEFT JOIN but don't know how to make that work on four tables rather than just two. Thanks in advance. Dawn http://www.rdcss.com/ - RD Computer Solutions http://wow.cooncheese.com/ - WOW.CoonCheese.com http://dpenguin.rdcss.com/ - Cornucopia Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL with perl
I've written a couple of scripts and have a thing that I haven't quite figured out. If anyone can shed light on this, I'd appreciate it. When a person submits a form that inserts a record into the database, if they then refresh the page that comes up after the submit, the record will be submitted a second time. I suppose this is due to the fact that the subroutine that is called with the submit contains both the write to database bit and the view bit. So refreshing causes a repeat of both items. How can I do this without that problem? Thanks in advance, Dawn H It's practically impossible to look at a penguin and feel angry. --Joe Moore http://www.rdcss.com/ - RD Computer Solutions http://wow.cooncheese.com/ - WOW.CoonCheese.com http://dpenguin.rdcss.com/ - Cornucopia - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: FW: FW: fascinating. bug
Hi, folks, The quote below - jonbad.txt is the 'view source' of a page in IE5.0. Just a minute later, after refreshing, the same person on the same browser got jongood.txt - without any changes being made to the page on the server. For some reason PHP is not doing right. Any ideas? A cookie problem was suggested, and is being checked. Any other possibilities? The page is at http://nashvillemusicmall.com/ Thanks in advance, Dawn --FROM JONBAD.TXT-- table border=0 cellpadding=0 cellspacing=0trtd valign=top table align=left border=0 cellpadding=0 cellspacing=0 width=130trtd width=129 valign=top bgcolor=#cc A href=http://www.nashvillemusicmall.com/mall/shopping/;img src=/images/nmm.gif?PHPSESSID=0176c7a3da508934dcbed7424ea4c086 width=130 height=65 border=0/a img src=/images/clip/search1.gif?PHPSESSID=0176c7a3da508934dcbed7424ea4c086 width=11 height=21 align=left alt=search border=0br clear=all form action=/mall/shopping/searchresults.php method=GETINPUT TYPE=HIDDEN NAME=PHPSESSID VALUE=0176c7a3da508934dcbed7424ea4c086input name=search value=Search type=text size=9/td/tr/formtrtd bgcolor=#cc FORMINPUT TYPE=HIDDEN NAME=PHPSESSID VALUE=0176c7a3da508934dcbed7424ea4c086 img src=/images/clip/browsearch1.gif?PHPSESSID=0176c7a3da508934dcbed7424ea4c086 width=127 height=18 align=center alt=Browse | Search/td/trtrtd bgcolor=#cc --END QUOTE FROM JONBAD.TXT-- -FROM JONGOOD.TXT- table border=0 cellpadding=0 cellspacing=0trtd valign=top table align=left border=0 cellpadding=0 cellspacing=0 width=130trtd width=129 valign=top bgcolor=#cc A href=http://www.nashvillemusicmall.com/mall/shopping/;img src=/images/nmm.gif width=130 height=65 border=0/a img src=/images/clip/search1.gif width=11 height=21 align=left alt=search border=0br clear=all form action=/mall/shopping/searchresults.php method=GETinput name=search value=Search type=text size=9/td/tr/formtrtd bgcolor=#cc -END QUOTE FROM JONGOOD.TXT-- Filter fixer: database,sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
DELETE question
Anybody got a clue why this isn't deleting? The number is input in the previous section of code and I know it works correctly, but for some reason when it gets to here, it just skips to view (apparently), (even if I # out the Lock lines, so it isn't a lock problem). Am I going about getting the number into the query in the wrong way? If so, what is the correct manner to achieve this? Thanks in advance for your help, Dawn H -CODE BELOW- sub delete { $num=param('delete'); $num=$dbh-quote($num); GET_LOCK(edit,10) or bail_out(Cannot get lock, please wait a moment and try again); $sth = $dbh-prepare(DELETE FROM database WHERE id=$num) or bail_out(Cannot prepare to be deleted); $sth-execute() or bail_out(Cannot delete); RELEASE_LOCK(edit) or bail_out(An error occurred when attempting to release lock); view(); } - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php