Search found 19 matches

by ruthsimon
Sun Dec 05, 2004 10:00 am
Forum: Databases
Topic: Closing a result set
Replies: 7
Views: 717

'$row = null' worked. Thank You! Ruth
by ruthsimon
Sun Dec 05, 2004 8:27 am
Forum: Databases
Topic: Closing a result set
Replies: 7
Views: 717

not sensitive -- just in the way...

This is for a calendar of upcoming events. The common header for the entire site calls a SQL statement and then displays the next upcoming event (this is the original result set). One script on the site is the form to input new events. The first time a user sees the form it should not be populated -...
by ruthsimon
Sun Dec 05, 2004 12:26 am
Forum: Databases
Topic: Closing a result set
Replies: 7
Views: 717

kill result set

I want to kill the result set, so I can't even echo any data from it. mysql_free_result just releases the memory, but the result set still exists. From the PHP manual: Example 1. A mysql_free_result() example <?php $result = mysql_query("SELECT id,email FROM people WHERE id = '42'"); if (!...
by ruthsimon
Fri Dec 03, 2004 12:19 pm
Forum: Databases
Topic: Closing a result set
Replies: 7
Views: 717

Closing a result set

This should be easy:

I have a query result set and I've already used the results of the set. How do I then get rid of the result set from that query later on in the same script?

It's obviously not mysql_free_result. Any function I'm missing?

Thanks, Ruth
by ruthsimon
Tue Feb 10, 2004 12:58 pm
Forum: Databases
Topic: Changing Group heading based on SQL date field
Replies: 6
Views: 768

Thanks, that worked great. I was moving towards that type of solution, but was hoping to come up with something that didn't have to run the query so many times over on a single page (for example, if there are comments each day for 30 days running, the second query has to run 30 times to complete the...
by ruthsimon
Mon Feb 09, 2004 11:34 pm
Forum: Databases
Topic: Changing Group heading based on SQL date field
Replies: 6
Views: 768

Thanks, I don't have any problem with date formatting. I'm using similar SQL, but I'm trying to figure out how to nest the while statements so that I only display the date one time, then all the records with that date, and then the next occuring date. Here's the code: //Query to select all user comm...
by ruthsimon
Mon Feb 09, 2004 3:04 pm
Forum: Databases
Topic: Changing Group heading based on SQL date field
Replies: 6
Views: 768

Changing Group heading based on SQL date field

I have a MySQL table for user comments with the following fields: ID Date Time UserName UserComment I want to display the all the records for each date (most recent date first) on the page under a single heading for each date. For example: January 30, 2004 UserName, UserComment UserName, UserComment...
by ruthsimon
Sun Nov 09, 2003 9:10 am
Forum: PHP - Code
Topic: All forms acting like multipart/form-data
Replies: 1
Views: 410

All forms acting like multipart/form-data

I added a form to my site with enctype="multipart/form-data" in order to use the php copy function to upload files. That works fine. Here's the weird part. Now all my files are acting like they're uploading objects. Even if I do a super simple 'post' form with no explicit enctype, and I re...
by ruthsimon
Wed Nov 05, 2003 2:11 pm
Forum: PHP - Code
Topic: Can you find an image width & height after http upload?
Replies: 2
Views: 295

height and width

That was painless..

Thanks!
by ruthsimon
Wed Nov 05, 2003 1:58 pm
Forum: PHP - Code
Topic: Can you find an image width & height after http upload?
Replies: 2
Views: 295

Can you find an image width & height after http upload?

In my script, a user has uploaded an image. I want to determine if the image is the right size for display on a thumbnail page, or if it should be displayed otherwise.

Is there a way to find out the image's height and width?

Thanks, Ruth
by ruthsimon
Thu Oct 30, 2003 3:55 pm
Forum: PHP - Code
Topic: Setting Maximum Directory Size
Replies: 1
Views: 372

Setting Maximum Directory Size

Is there a function or way to set the maximum size of a subdirectory?

Users are allowed to upload images to a specific subdirectory, but I want to alert when the subdirectory hits a certain size.

Thanks, Ruth
by ruthsimon
Wed Oct 22, 2003 3:28 pm
Forum: Databases
Topic: Moving to a specific row in MySQL result set
Replies: 2
Views: 383

Moving to a specific row in MySQL result set

I have a page which first displays all rows of a MySQL result set (which leaves me at the end of the set). I then want to go to a specific row in the set based on a value in the field (I can't use a row offset because I don't know which row has that value). I could just do another query with a WHERE...
by ruthsimon
Tue Feb 04, 2003 2:07 pm
Forum: PHP - Code
Topic: Calling a Variable within another Variable
Replies: 2
Views: 459

Perfect. Thanks.
by ruthsimon
Tue Feb 04, 2003 1:48 pm
Forum: PHP - Code
Topic: Calling a Variable within another Variable
Replies: 2
Views: 459

Calling a Variable within another Variable

I have two MySQL tables: Location and Contact. Each have a numeric primary key LocationID and Contact ID. The SQL statement for retrieving record information is identical for each, so instead of repeating my SQL, I set up a quick array. $detail = array("Location","Contact"); Now ...
by ruthsimon
Wed Jan 29, 2003 5:13 pm
Forum: PHP - Code
Topic: Need help with dynamic variables
Replies: 2
Views: 332

Thanks for the answer, but this looks like even more code.

Maybe I'm going in the wrong direction trying to use dynamic variables. I'm want to avoid using the same definitions for multiple variables--make the code more efficient.

Any ideas? Ruth