|
ok...i quited first method cuz i have no idea how to do it, but u'r second method sounds better because my sql query is how u told me just for 1 day.My query is :
SELECT classes.day, classes.starthour, classes.finalhour, course.nume_curs, proffessor.prof_name,groups.group_name
FROM classes, proffessor, course,groups
WHERE classes.profid = proffessor.profid
AND course.coursid = classes.courseid
AND classes.groupid = groups.groupid
AND classes.day = 'Monday'
.Here is a print with my results What i dont understand is what do u mean by "creating one row" and can u give me an exemple how that array should look?.Thank you
|
|
|
|
|
I'm not going to give PHP code; what follows is pseudo-code to create one HTML table row between firstHour and lastHour:
0. create an empty array representing the relevant hours (or quarters or whatever time unit you choose) for one day.
1. run your SQL query for that day
2. foreach result from SQL query mark the hour(s) in the array
3. now generate HTML code for one row of your HTML table, starting with TR tag
4. foreach hour between firstHour and lastHour look in your array and create either an empty table cell, or a filled table cell using TD tag, P tag, etc.
5. close table row with /TR tag
|
|
|
|
|
thank you very much for ur pseudo-code sir.This is very usefull.
|
|
|
|
|
ok ..
you end with
<pre>
echo "</table>";</pre>
<code>but where is the start "<table>" tag ?</code>
=======================
<pre>echo "<table border=1>";
if($orastart == "8" && $orafinal <= "10")
{
echo "<tr><td>8 - 9</td><td rowspan = '2'>".$nume_curs."<br />".$prof_name."<br />".$nume_grupa."</td></tr>";
echo "<tr><td>9 - 10</td></tr>";
}
else echo "<tr><td>8 - 9</td><td>&nbsp;</td></tr>
<tr><td>9 - 10</td><td>&nbsp;</td></tr>";
if($orastart >= "10" && $orasfarsit <= "12" )
echo "<tr><td>10 - 11</td><td rowspan = '2'>".$nume_curs."<br />".$prof_name."<br />".$nume_grupa."</td></tr>
<tr><td>11 - 12</td><td>&nbsp;</td></tr>";
else echo "<tr><td>10 - 11</td><td>&nbsp;</td></tr>
<tr><td>11 - 12</td><td>&nbsp;</td></tr>";
}
}
echo "</table>";</pre>
|
|
|
|
|
I'm successfully calling a mysql stored procedure using PDO with the following line:
$pdoCmd->fetch(PDO::FETCH_OBJ)
It returns an object that I need to get converted into an integer, seems straightforward enough but when the object is say "1000" and I cast to an int I get a value of 1.
How can I convert an object to an integer and keep my zeroes?
|
|
|
|
|
Think I figured it out:
$objResult = $pdoCmd->fetch(PDO::FETCH_OBJ);
$intValue = (int)$objResult->MyColumnName;
Cheers
|
|
|
|
|
Dear all,
any one can help me.....!
Problem: i have window base server where tomcat is installed.i want to detect tomcat when start up. i want to run bat file when tomcat start up.
tell me how i configure Apache tomcat what should be the solution?
behind the reason of this problem is ..i want to call http url when tomcat start.
i will write http url in bat file and i want this bat file will be execute when tomcat start.
|
|
|
|
|
due to lack of software they have provided which is not working on fedora
how TO install it
|
|
|
|
|
Maybe this[^] can help
"I'm willing to admit that I may not always be right, but I am never wrong." - Samuel Goldwyn
|
|
|
|
|
there is an error that ~lmysqlclient not found
HELP with sample Coding example
and compiling procedure
|
|
|
|
|
Make sure you have the mysql-devel RPM installed.
|
|
|
|
|
Hi friends !
We have already html forms or flash file(.swf).
How can we do to "Embed html forms or flash into facebook".
Any ideas or link to do it step by step!
Thanks !
|
|
|
|
|
Hi,
I have a vb program which communicates with PHP but cut long story short it works
What i want to know is if i develop this PH further can i create a login screen on the internet and allow the user to amend records?
e.g if a teacher did a register of a class and messed it up could they login online and edit the absent and present column?
Please note i am new to PHP!
Thanks
Dan
|
|
|
|
|
The answer is "maybe"...
If the records you want to amend are stored in a database that you have access to using PHP, then you can do whatever you like with them, assuming you have the required permissions.
Sorry the answer is a bit vague, but you asked quite a vague question.
|
|
|
|
|
|
Awesome thanks,
So how would I go about allowing one of the columns to be edited? How do i allow the permissions?
Thanks again
Dan
|
|
|
|
|
offroaderdan wrote: So how would I go about allowing one of the columns to be edited? How do i allow the permissions?
You'll also need a webserver. Think IIS if you're on Windows, Apache if you're on Linux. Next, you'd need to test if PHP is configured correctly to work with your database-setup.
W3Schools would be a good place to start, they've got examples on interacting with a database to get you started[^] I are Troll
|
|
|
|
|
it seems you want to use database and tables, first of all you have to install a server to that particular system. As you are newbie download easyphp or wampserver, install on that system. Dont worry about individual install of apache or mysql. This software will do it for you. And then simply follow tutorial given on their sites.
|
|
|
|
|
WOW ,
I found these links brilliant
however i was using link 2
http://www.phpeasystep.com/phptu/6.html[^][^]
and have come across a few probems, i did exactly what the tutorial said. I then try and run the main_login.php in internet explorer, type in the name and password press login and it comes up with a pop up box saying do you want to open or save this file (check_login.php)????? i have already created this file exactly how it wanted?
Does anyone know why this is coming up with this popup and how do i solve this problem
Thanks
Dan
ps i am learning a lot about php keep up the good work
|
|
|
|
|
You are trying to run the file using the web server aren't you?
That is, the URL must start with http:// or https:// and not file:// - the PHP file has to be run through the web server.
If you are running through the web server and still getting this, the PHP handler might be installed incorrectly, or the script is setting the wrong content-type header.
|
|
|
|
|
you can destroy session always..
|
|
|
|
|
Does anyone know how to make this site display in English?
http://www.turbolinux.com/[^]
Browser's language setting makes no difference. It seems to use my IP address to decide what language I should understand (and I don't want to use an anonymous proxy).
|
|
|
|
|
I want to know too....
When pig can fly~~
|
|
|
|
|
I found this on Wikipedia "Turbolinux is a Japanese Linux distribution targeting Asian users.". It would appear they do not offer an English version, probably as they are not targeting English speakers.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Ugh. How infuriating.
Thanks! I didn't realize it had become a Japanese-only OS.
|
|
|
|