[PHP] Setting total db size to a variable.

2003-07-19 Thread Jason Martyn
I have a question in regards to finding the total db size and setting it to a variable.

How would I go about this?

Fw: [PHP] Setting total db size to a variable.

2003-07-19 Thread Jason Martyn
 Theres a problem with the SQL query. It fails? I tried removing the " =
 '$tablename' " however, then the mysql_fetch_array cannot save the result
 set.

 I guess my basic question is how do I query the SHOW TABLE STATUS for a
 specific table in a specific database.

 <-- Forgot to post this earlier -->
 My apologies.

 There are 2 databases. The admin database and the registrant info database.
 I would like to be able to be able to calculate the size of the combined
 databases and use them as a statistic. In the first database there is 5
 tables, and in the other database there are 2 tables. I'm using MySQL V.
4.0
 and PHP V. 4.3.
 <-->

 Jay


> - Original Message -
> From: "David Nicholson" <[EMAIL PROTECTED]>
> To: "Jason Martyn" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, July 19, 2003 5:51 PM
> Subject: Re: [PHP] Setting total db size to a variable.
>
>
> Hello,
>
> This is a reply to an e-mail that you wrote on Sun, 20 Jul 2003 at
> 00:42, lines prefixed by '>' were originally written by you.
> > I have a question in regards to finding the total db size and
> setting
> > it to a variable.
> > How would I go about this?
>
> For mysql this will do the trick...
>
> $info = mysql_fetch_array(mysql_query("show table status from
> $databasename  = '$tablename'"));
> $sizeinMB = $info["Data_length"]/1024/1024;
>
> --
> phpmachine :: The quick and easy to use service providing you with
> professionally developed PHP scripts :: http://www.phpmachine.com/
>
>   Professional Web Development by David Nicholson
> http://www.djnicholson.com/
>
> QuizSender.com - How well do your friends actually know you?
>  http://www.quizsender.com/
> (developed entirely in PHP)
>


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



[PHP] Freeze Pane

2003-07-25 Thread Jason Martyn
This is probably under the category of javascript, however I would like ot know if it 
is possible to be done with php.

Let's say I have a table that is 30 columns wide and so the entire table doesn't fit 
on the screen. Is it possible (with php) to "freeze columns" while scrolling across so 
you don't lose the original 2 columns?

And since it probably isn't, can someone suggest a language that would cover this 
subject?

Thanks,
Jay

Re: [PHP] Freeze Pane

2003-07-25 Thread Jason Martyn
Thanks Rob.

Your idea on the div tag works perfect. Definitely the preferable
alternative to javascript..

Jay

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



Re: [PHP] Freeze Pane

2003-07-25 Thread Jason Martyn
I will put up the link to the example later. I'd just like to mention one
thing if anyone else uses this solution:

You may want to put both tables in the  tags and give them both
absolute locations. This eliminates the possiblity of having a mismatched
table as different browsers are used.

- Original Message -
From: "Jason Martyn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2003 8:49 AM
Subject: [PHP] Freeze Pane


This is probably under the category of javascript, however I would like ot
know if it is possible to be done with php.

Let's say I have a table that is 30 columns wide and so the entire table
doesn't fit on the screen. Is it possible (with php) to "freeze columns"
while scrolling across so you don't lose the original 2 columns?

And since it probably isn't, can someone suggest a language that would cover
this subject?

Thanks,
Jay

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



[PHP] Problem setting variables.

2003-07-27 Thread Jason Martyn
I'm creating a script that filters the table of results from a database based on the 
configuration set by the user (config stored in database as well).

For example a table has 30 columns. However the user need only see 5. Every user is 
different so a user configuration is stored in the database.

The database has 2 columns: field_name and show_field. 
field_name is the name of the field (obviously) that is shown in the table.
show_field can either be a 1 or a 0. 1 = show field. 0 = don't show field.

I'm getting to a certain point. But I'm not sure how I can go about setting variables 
for each field_name that has a show_field value of 1.

Heres the code.
 0)
 {


//*//
// Here is where I would like to set variables.
// I first thought of using a for statement, but
// realized that variables cannot begin with a
// number. Is there any possible way to set
// variables for the array results of my query?
//*//

 }

else
 {
  die("Please select at least 1 field to be shown.");
 } 

 }
 
?>

Thanks,
Jason

[PHP] I don't understand...

2003-07-30 Thread Jason Martyn
Hey,

I'm trying to create a table based on user configurations (saved in mysql db). The 
user is able to filter the table view to only the columns he needs.

The tables are setup like this:
each season has its own table.
config table
currentseason table

Each column in the season table = row in the config table.
The config table has 3 columns: field_name, show_field, display.
The field name is filled with each column's in the season table.

Here's kinda what I'm trying to do (not working of course).