[PHP] International Addresses and Telephones
I have a form which captures US addresses ( address, city, state ) and telephone numbers ( 10 digit ) and am writing this data to a MySQL table. I need to expand this to capture non-US info, so I was hoping for some guidance on forms and table structures. I have googled this to death and still haven't come up with anything.
[PHP] LAMP
I am setting up a new Redhat Linux 9 box for use as a non-production test server. I prefer to use source files v. RPM's. Anyone know which of the newest versions of Apache, MySQL and PHP will play together nicely. Thanks Randy Rankin
[PHP] PHP, MySQL and Flash
Does anyone know of any articles on integrating PHP, MySQL and Flash to perform a drag and drop routine for updating a db? Specifically, I have a client who is _INSISTING_ that I integrate a drag and drop feature into his railcar storage application. He wants to be able to view two railcar storage tracks, Track A and Track B, then drag and drop cars from Track A to Track B ( or Track B to Track A ). Once he positions ( orders ) all the cars properly on each track, I need to update a MySQL db to reflect the changes. I have already developed the above feature so that he can do this 'textually', but he is _determined_ that he must have the graphic 'drag and drop' feature. There may be another method ( Javascript ? ) to accomplish the same effect. I am certainly open to any advice and/or opinions. Any pointers would be _greatly_ appreciated. Thanks, Randy Rankin
RE: [PHP] connecting to mysql db
Place the code in a file ( ie; dbcon.php ) and include that file in any page which may need it using an include statement: include(dbcon.php); Randy -Original Message- From: Iggy [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 7:50 AM To: [EMAIL PROTECTED] Subject: [PHP] connecting to mysql db hi, I am trying to play and learn php along with mysql and I have a question about connecting to a db. Is the following code necessary on every php page where I am retrieving some data from a db or is there any way to connect once (something like index.php) and have that connection open through subsequent pages? the code ?php $link = mysql_connect(localhost, , ) or die(Could not connect: . mysql_error()); print (Connected successfully); mysql_select_db(test) or die(Could not select database: . mysql_error()); ? thanx iggy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Limit the amount of returns in a MySQL query
select * from mailaddresses where id 10 LIMIT 10; -Original Message- From: Daniel Page [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:53 PM To: [EMAIL PROTECTED] Subject: [PHP] Limit the amount of returns in a MySQL query Hi All, Imagine I have a giant database table tracking email addresses (I don't but it is the first example that jumps to mind after my recent antispam campaign!). If i do a select * from mailaddresses; I will get all of the table. If i do a select * from mailaddresses where id 10; I will get all the records where the id is less than 10... The problem is that I want 10 records, period, so if id is not a primary key, I could have 60 records that match... or if it is a P.K., but I delete 2 to 8, it will only return 2 records (1 and 9...) How can I structure the query to only return only 10 records ? the idea being able to construct a query where if there are more than 10 (or x) results on a page, you click on a link 'page 2' and so on, and the next query will return the next 10 (or x) records... Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [PHP-DB] Broken Links 2
Thanks to everyone for the help. For those interested, I have posted the final code below. It functions beautifully with one exception: the resized image quality is rather poor. I am now reading through the php manual and newsgroups for a solution, but if anyone knows how to handle this it would be great to hear from you. Thanks again for all your help! Randy - BEGIN CODE -- ? if( $image_id ) { $sql=SELECT image_bin_data from IMAGES where image_id='$image_id'; $result=db_query ( $sql ); $record=db_fetch_object ( $result ); $image=$record-image_bin_data; $new_w=75; $new_h=75; Header(Content-type: image/png); $src_img=ImageCreateFromString($image); $dst_img=ImageCreate($new_w, $new_h); ImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img) ,ImageSY($src_img)); ImagePng($dst_img); ImageDestroy($dst_img); };? - END CODE --
RE: [PHP] php/frontpage
Yes. Frontpage can edit php files ( albeit not very gracfully ). So, if you must ... Open Front Page Select Tools | Options Select the Configure Editors tab and add the .php extension. HTH, Randy -Original Message- From: Shaun [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 17, 2002 8:50 AM To: [EMAIL PROTECTED] Subject: [PHP] php/frontpage Hi , I used ms frontpage 2000 to make a website. When i comepleted the site , i had to study php to enable database capabilities. When i changed my login.htm file into login.php, ms frontpage did not recognize the .php file. All the navigational links/views were removed from the login.php file. Can i enable frontpage to work with php. if not , what program would you use ? Thanks ,Shaun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Confused
I have two MySQL tables, groups and users: groups: group_id, group_name users: user_id, user_name, group_id, etc. I would like to produce one table for each group which will list all the members for that particular group. For example: Blue (group_id 1) Tom (group_id 1) Nancy (group_id 1) Jim (group_id 1) Red (group_id 2) Bob (group_id 1) Susan (group_id 1) James (group_id 1) ... My question is, do I need to run 2 queries? The first to select all the groups and the second to select all the users in each group based on the group_id? How would I loop through to create a table for each group? Thanks in advance for any help. Randy Rankin
[PHP] Date Concat?
I have two fields of type date in a MySQL table called training: start_date end_date I can format the date using a select, for example SELECT DATE_FORMAT(start_date, '%M %d, %Y') as start_date, DATE_FORMAT(end_date, '%M %d, %Y') as end_date FROM training This produces the following: start_date: September 16, 2002 end_date: Sepetember 20, 2001 Based on the above, I would like to echo out something like this: You will be in training September 16 - 20, 2002. Is this possible? Thanks in advance, Randy