Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Day View Calendar / Mysql Entries


I am trying to create a day view of a lab resource reservation system. So far, I've been able to generate a day view table with php, using variables for start time, end time and periods. Periods represent intervals on the day view.

I have two columns in the table:  the first one starts at the start time (say 8:00) and there is a row for every time until the end time, each row time being increased by the period, ie. 8:00, 8:30, 9:00 where the period is 30 minutes and the end time is 9:00.

My second column in the table is filled with unix timestamps representing the date for that particular row, so the 8:00 row on July 1, 2007 is represented by a timestamp of 1183291200. I then created variables to represent start and end times and date of a reserved lab resource. I did a little switch statement in my second column of my table saying, if that row's timestamp equals the start or end time of my reserved resource, than give it a certain style.

All well and good, except I need to tie this into a mysql database where the reservation details (start, end, date) are stored.  Where I am getting fuzzy is how to integrate the query results from the database into my little system.  I would like to have that second column pick up the results from my query and display the reservations, but I'm not sure now to do that. I'd like to post the code here, but I'm not sure how to post php code on these forums without getting yelled at for doing it wrong (I did that once, can you tell?)




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Web Calendar Group/individual View Events?
There seem to be a lot of web calendars out there and I am having a tough time sorting out which ones to even try - a lot of the more popular ones were created 2 or 3 years ago.
Can anyone recommend a good one that uses php and mysql preferably?

One of the main uses would be for family to indicate their holidays so all in the family can see. Thus, it would require a group/public feature that allows users to see all "public" holidays or just their own holidays.

Getting Name Of New Of View From MySQL 5.0+
We are using MySQL 5.0+ because it now supports views. However it
appears that the PHP's(4.3) mysql_field_table() is returning a
temporary name table name rather than the actual table (view) name.

For instance we have a view defined as "open_meeetings_view", yet when
we do a mysql_field_table() the name retrieved is "#sql_7a3a_1". The
same call correctly retrieves all static tables and even aliases
correctly.

It does not appear that PHP has the ability to dig any deeper (maybe in
PHP 5.0?), but does anyone know how to query MySQL for this information
directly? A "show tables" does show the view names correctly. So we
just need a way to correlate the temporary table "#sql_7a3a_1" back to
the real view name "open_meeetings_view".

Cant View Data On My PHP Page From MySql DB.
Im working on a character generator for a PHP game Im trying to get going but Im having trouble getting data from my mySql database. I created the table and added all the columns using this file:

View MySQL Data In PHP Tables
Does anybody know where I can get a code snippet on displaying data from a MySQL query in a table? If there is numerous rows that a query returns..this is a much better way of displaying them....i think....

PHP, MySQL Calendar
I wanted to run this idea past you. I am looking to create a PHP Calendar with a MySQL Backend. How is this going to work? I have NOOO idea!! Here is what I need it for:

I am a resident assistant, and am looking to make a calendar system to schedule duty. Only one person is on duty during the weekdays (Mon, Tues, Wed, Thurs, Sun) and two people are on duty during the Weekends (Fri, Sat).

There needs to be an input system where one RA can go in and say that Person A is on duty on Weekday X of Month Y of Year Z or Person A and Person B are on duty on Weekend Day X of Month Y or Year Z.

I also want to be able to keep track of how many weekdays/weekend days each person has for each month.

I would like to be able to display all of this in a calendar (which can be an html table or whatever).

Does anyone have any ideas as to how I can implement this? (sql table columns, dealing with different amounts of days in each month, etc.)?

Deleting Entries From Mysql
I have business listings that I have pulled from a database(MySQL) and printed to the page, in an admin page, for review. I'm trying to write a script to add and one to delete the listing.

I get an SQL error, 'check the manual for blah blah near " on line 1'

Here is the 'delete script:

Get All Entries From Today (mysql)
I currently have a page that each time a user visits it, the pageid and timestamp is thrown into a mysql daabase.

so the database looks like so:
linkid time
3 2007-08-22 17:26:21
3 2007-08-20 17:26:21
3 2007-08-22 18:36:59
2 2007-08-22 18:37:21

What i need is for php to show the total amount of visits today as per a certain time zone (or if thats not possible, the past 24 hours)

soo..
Search for all occurrences where linkid = 3 today for a specific timezone (or 24 hours)

MORE SPECIFICALLY
User 1: Lives in New York (EST -5)
registers for my site and sends visitors to his linkid (3)

After two days, this is what the mysql table looks like:
linkid time
3 -=- 2007-08-22 17:26:21
3 -=- 2007-08-20 17:26:21
3 -=- 2007-08-22 18:36:59

But mysql time isn't Eastern time, its another timezone. So when a visitor comes to user1's page at 3pm EST, mysql registers the time as 2007-08-22 17:26:21

So... I want to first add/subtract the number of numbers in the mysql database depending upon the user, and then see the amount of visitors for the day.

MYSQL Entries Won't Update
I am trying to update some entries in a mysql database that will append the filename to the end of a thumbnail directory entry. So for example /images/thumb/ would become /images/thumb/12345.jpg.

I am stumped because the below code gives no php or mysql errors but the entries are not updated in the mysql db! Code:

Class For Editing Mysql Data From A Users Point Of View
I was wondering if you know of any good php class for editing mysql data from a users point of view. Kind of like PHP My Admin but then really simple and efficient.

I have a look at www.phpclasses.org, but have not been able to find anything.

Multi Entries Update To Mysql
Could someone help me to figure out how to upgrade multi entries to Mysql by using PHP?

Say, I have a table on Mysql

id Priority
1 Okay
2 wait
3 later
4 asap
5 hold

Now I want to upgrade that table to:

id priority
1 hold
2 asap
3 okay
4 wait
5 later

Is it possible to upgrade multi entries with one submitt button? If yes, could you tell me how it could be done.

I knew I could do it by each entry (submitt button).

Update priority set priority='$priority' where id = '$id'

Selecting 4 Random MySQL DB Entries?
I have a table set up in my MySQL database called 'features'. This table has 10 entries, but I only want to select 4 random rows and display them out in tables.

Limiting User Mysql Entries
I have a script i'm making which is going to be used to search for reciprocal links on different sites and I have user levels such as free, paid, ect... I want to make it so that if the person signs up as a free user they can only add like 2-3 domains to be searched for their links. How would I limit the number of domains allowed to be searched? Would I limit the number of mysql entries allowed in the table for the domains?

Populating Dropdown With Mysql Entries
I would like to create a combobox in Flash which is populated with mysql data and programmed with php. For example: There are 3 entries in database .ie. apple, bannana, peach. Now these I want in combobox in Flash MX/flash5.

PHP/MySQL Calendar Compare Question
Most of the events in the calendar are all-day affairs, but some occur at
specified times. So I have two separate fields in the event table, one for the
DATE (required) of the event and one (optional) for the TIME of the event. For
events that span multiple days, I have them enter the event once per day, but
could automate that sometime.

ANYWAY, here's my question:

When I am displaying a calendar, for each date in the month displayed, I search
the event table for events on that date. BUT, I was not able to use an = in the
where clause, I guess because a date in MySQL always has the hours, minutes, and seconds attached. I played around with trying to change the $dateToCheck so it had hours, minutes, and seconds attached, but somehow never could get it right.

I ended up with a query like this:

SELECT * FROM $thisTable where START_DATE >= '$dateToCheck' AND START_DATE <
'$dateAfterToCheck'

Is there a more elegant way for me to accomplish this?

Events Calendar Using MySQL Database
I have a mySQL table listing all the regular events that happen each month for a group according to schedules like, every Sunday or every other Saturday*. How can I make a visual monthly calendar out of this? Basically, I need to produce a list of dates for each of the events happening in a given month. That's where I'm stumped.

Select All Unique Collumn Entries In Mysql
Can anyone tell me how you can query mysql for all unique entries into
a particular table collumn. Ive checked the manual but had no luck!

INSERT Into Mysql Alway Make Two Entries
I code some site and because Im a freak I made my own session-handling.
When a user open up my site it will check if there is a ssid in the url
if not generate one. this will be done by a function generate_ssid() and works fine.
next step is to register the ssid in the table session
this will be done by the following code:
******************************
function ssid_register($ssid,$login,$uid,$admin){

$connect = mysql_connect( $GLOBALS["db_host"],
$GLOBALS["db_user"],
$GLOBALS["db_password"])
or die($GLOBALS["db_error"]);
mysql_select_db($GLOBALS["db_name"],$connect) or die($GLOBALS["db_error"].'<br>ErrorCode s.001-con');
$result = mysql_query("INSERT INTO session SET ssid='$season',ip='$rip'",$connect);
echo ($rs);
return;
}
********************************
I redesigned the INSERT INTO part into all possible syntax but everytime I look into the db, there are two entries with two DIFFERENT ssids.
The only way it works correct is to dont use a variable on the first place.
Means if I use ssid='godhelpmetofindaworkingsolution' it works great but is not realy what I want.

As told above a "INSERT INTO session (ssid) VALUES ($ssid)" also has the effect of two new db-entries.

Populate MySQL With Multiple Text Box Entries
I have about 300 rows of mysql data which I have chosen to diplay with a text box at the end of each row, that is available for adding comments. I would like to be able to add comments to entries and then have an update scripte that would take the text box, named "MC" and place the data in its row identified by a hidden field which would corrrespond to the Primary Key of the MySQL Database. I've done something similar using check box arrays, ie. Checkbox name="MC[]"

My question is whether I can write a script that would test for a value in the corresponding text box, and update the MySQL data accordingly. I have also provided in my display script that if the MC column is already populated in MySQL it will not display in the form.

Number Of Identical Entries In MySQL DB Column
How do you display the number of times a particular entry appears in a column of a database?

Range Of Dates For Mysql To Flash Calendar
I have a database that stores records of calendar events that can range in length (eg- from jan 02 to feb 13). I have a flash web interface that takes in specifically formatted date variables (eg- “&01022002=on this day we go to the park”).

The interface between the two formats the entry. Previously each record from the db could not be a range of dates so it was easy to format. Now, I have to figure out a way to overlap different ranges of dates so it will work.

Can anyone tell me if this has been done before in a similar application I could look at or else point me in the right direction?

Populate A Calendar Page With MySQL Data
I'm trying to figure out the best way to populate a Calendar page with data from a database.  I have the code that will generate the Table with Days of the week, but I'm at a loss on how to populate this with data from a database.

Do I build the calendar and then for every day that I generate a cell, query the DB or should I load the DB in an Array and compare that to the date of the cell?

Deleting Duplicate Entries From MySQL Database Table
The topic is related to MySQL database.

Suppose a table "address" contains the following records

-------------------------------------------------------
| name | address | phone |
-------------------------------------------------------
| mr x | 8th lane | 124364 |
| mr x | 6th lane | 435783 |
| mrs x | 6th lane | 435783 |
| mr x | 8th lane | 124364 |
-------------------------------------------------------

Quote:

Date Dropdown From Mysql Date Entries
For the PHP gurus out there, here is what I want to do: create a dropdown list of available dates from a mysql database date entries. But the dropdown/s should have 3 separate fields in month, day and year which in effect shows only those months, days and years that have corresponding entries from the database.

Planning to use this in the archive section of an online news publication so people can select issues to view via dropdown list that have corresponding entries only.

Url View
Is there a way using php to check what php script the user is viewing? If so how is it done?

View Source
I was at amazon.com and clicked on View/Source, and I got a blank page. How did they do that?

Directory-View With PHP
I've programmed an access-control via header()-function. It
checks an username and password in database ... nothing special.

Currently, the control gives access to a download, but I would
like to allow special users to view the complete directory.

AFAIK this is only possibly through ".htaccess" (Apache webserver).
But then, I need to create an entry for each user in the database
in the file :-(

Would it be possible to allow this direclty through PHP?
Of course, I could write dynamically into htaccess, but if
several users would access the file at the same time ... URGHS :-)

SQL VIEW Table
When I make a view table in mysql for as pre request from a client, does this table belongs to the this client only or all the clients who uses the server. My intension, i want to create exclusive "temp" tables for clients, where no other clients will be able to go into it.

View All Plus Pagination?
i have a online store that has about 2800+ products  - on my productList.php pages I have a few variables to display the number of products per page:

<?php
$productsPerRow = 3;
$productsPerPage = 27;my boss would like a view all button that sets $productsPerPage to the total number of products  - and is active for as long as the SESSION (Perhaps unless the button is clicked again?)

Any Ideas on the best approach to accomplish this??

PHP View Counter
How do I make a php counter, to count:

a) Total Views of one page

b) Unique views of one page

c) Use mysql with it

Way To View PHP Files On Your Computer?
Is there a way to view what certain PHP files will look like, without having to upload them to your server?

I'm testing out page layouts, and its kind of a pain to upload it every time to see what it looks like.

PHP Download/view Statistics
if anyone had any ideas for a simple way that I could use to get statistics on the amount of times a webpage has been viewed? I don't really want to install a whole web statistics package.. I just want to keep track of the statistics on a few pages.

View The Picture Before Save
when i upload the picture.. is there a way we can let the user to view the picture which they just browsed before they upload>??

e.g. user need to upload 3 pictures... so when user browsed the picture... usually what we get is just the path name...instead.. i wan to view the picture and the path... but these picture are not yet upload to the folder.

See On-line View Code
Hi! Is there any possible way to view an "on-line" php file? That is of course how you can view the code in a php file?

Generating Tree View!
My problem is simple though I am not too sure if the solution is.
I need to generate a tree view by using the data I have stored in the
database.For example in the root I have stored SportsBrand now if I
click on SportsBrand it will expand to show different names such as
Addidas,Nike,Reebok etc.Again if I click on Addidas I will have
different items such Shoes,T-shirts etc.I want to list the tree on
the left side of the screen and once the user click the items s/he
will see the related information on the right of the screen.Also if
the user want to add any new brand it will be shown dynamically under
the SportsBrand along with the items they are producing. Also if the
user want to delete any brand I have to make sure the tree structure
will be resized again.

xampp(The development IDE) is using this Tree view.

I have already progressed a bit by storeing the tree in database and
running the queries.Now I need to develop the user interface and
mapped it with the backend.

Is there any tool in PHP that will help me to do this? I think in
NETBEANS(Java IDE) they have a built in tool to generate this
structure.

Imap_headers Want To View Each $val Not All The $val In One String
I wish to view each item in $headers, but this script returns only an array of strings containing the items.

$headers = imap_headers ($mbox);
if ($headers == false) {
echo "Call failed<br>n"; }
else {
while (list ($key,$val) = each ($headers)) {
echo $val."<br>n"; }}

Private Client View
I would like to create a client login form for an small advertising
company.

What I need it to do is this,
1. The client logs into the website.
2. The client would see his job images.
3. he then could aprove it or send a comment back to the designer.

My question is,

1. Does anyone know of an existing project that can do this?
2. If I write it what would be the best way to present the client a
page that only will show his job.

View Contents Of Directory
I need a script that will display, in a table, all the contents of the folder. Like, for example, its filled with images, there will be a table and in each cell the file name with a link to the actual file. Can someone try to whip this up?

View The Source Of Another Page
From www.whatever.com/index.php how can I get the source for www.anothersite.com/page.php ?

View Only A Certain Number Of Characters?
I'm pulling up an article from a database but I only want to show the first 300 characters of it. How can I get rid of the rest?

Please Help View Php Source Code
i am trying to view the source code of a php page but when i view the page source it comes up with "&errormessage=Please fill in all fields and send again.&", i am trying to create a form to email box for my own website and have found one on a website i like, i am trying to get the php code but dont know how to get it to be displayed.

Upload Video And View
anyone know where i can get a simple video upload script and once its uploaded you can watch it?

View External Website
I've been trying to load another website in my current site through php.  So that way they don't actually leave my site.  I've been trying to use require_once("http://domain.com"); or include and thats not working.  Is there a easy way to do this in php.  I've been trying to look on how to do this and all that i've found is wordwrap (i think it was called) which I couldn't get to work. 

Simple View Counter
Anyone know a simple way to count views for each product using php and a database? Each product has its own ID.

View The Source Of A Web Page Using A Script?
This is probably some really basic operation, but how do I view the source
of a web page using a php script.

For example I want to have a variable, say

$url = "www.google.com";

Then I want to echo its source code, so that I have a page showing:

<html>
<head><title>Whatever</title></head>
<body>
..
..
</body>
</html>

Zend Framework View & Viewhelper
I have seen the view helper in the Zend Framework. Does anyone know if
there is any kind of plan to bring in bring in HTML_QuickForm like
validation into the Zend Framework? The view helper is currently
capable of generating form elements like quickform.

To Install A New Font While View Page!!!!
I am working with chinese fonts and experienced the difficulty as a user to view that page in chinese... How can i add (or install )chinese fonts to the user's system while the user try to view that page!!!!

Disabling View Source On Pages
what's the best way to protect source code on a page? I.e. not permitting the right mouse click to view source or properties.

View Uploaded Images Of Different Dates
iam using the following code to view the uploaded images.
i can select the 2 different dates and can see the uploaded images between these 2 different dates.i can also delete those images also.but it is working good on localhost.but when i upload the script on server,it is not displaying the images between 2 different dates which i select,it just displays todays uploaded images. Code:

How To View Items In Alphabetical Order
how can i view items in my database in alphabetical order?
SELECT COUNT(*) FROM #__brand_name ORDER by cat_name DESC

i tried this one but its not working.


Copyright © 2005-08 www.BigResource.com, All rights reserved