Click here to Skip to main content
15,904,817 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Stored Procedure with Php and MySQL Pin
PHP_Guy22-Mar-10 10:44
PHP_Guy22-Mar-10 10:44 
GeneralRe: Stored Procedure with Php and MySQL Pin
scorpio2222-Mar-10 10:56
scorpio2222-Mar-10 10:56 
GeneralRe: Stored Procedure with Php and MySQL Pin
PHP_Guy22-Mar-10 11:21
PHP_Guy22-Mar-10 11:21 
GeneralRe: Stored Procedure with Php and MySQL Pin
scorpio2223-Mar-10 3:44
scorpio2223-Mar-10 3:44 
Questionphp - include_once Pin
thes3cr3t16-Mar-10 22:39
thes3cr3t16-Mar-10 22:39 
AnswerRe: php - include_once Pin
chevu7-Mar-10 22:37
chevu7-Mar-10 22:37 
AnswerRe: php - include_once Pin
PHP_Guy19-Mar-10 7:51
PHP_Guy19-Mar-10 7:51 
QuestionOrganize mysql results in html table with PHP Pin
pelikan20026-Mar-10 14:15
pelikan20026-Mar-10 14:15 
Hello, my problem is the following: i have a query with 3 results from a database where i store a school timetable datas such as professors, courses etc...I try to put this results in a html tabel dynamic via php.So, for exemple i have courses from 8 to 10, 10 - 12 and 17 - 19.I have "if" conditions in while loop that allow me to verify if i have a course at x hour.If i dont have course at x hour i want to fill the table with empty cell " ".But the real problem is that when i try to do this while loop is displaying the tested conditions plus empty rows cuz of else condition , ofc it is doing like this cuz if the query has x results he will construct x times those empty rows...i dont know if somebody is understanding me and what i need to do.I will attach a piece of code here:

while($linie = mysql_fetch_assoc($rez))
{


if($linie['ziua'] == "Luni")
{

$orastart = $linie['orastart'];
$orafinal = $linie['orafinal'];
$nume_curs = $linie['nume_curs'];
$prof_name = $linie['prof_name'];
$nume_grupa = $linie['nume_grupa'];

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>";
AnswerRe: Organize mysql results in html table with PHP Pin
Luc Pattyn6-Mar-10 14:38
sitebuilderLuc Pattyn6-Mar-10 14:38 
GeneralRe: Organize mysql results in html table with PHP Pin
pelikan20027-Mar-10 0:53
pelikan20027-Mar-10 0:53 
GeneralRe: Organize mysql results in html table with PHP Pin
pelikan20027-Mar-10 5:22
pelikan20027-Mar-10 5:22 
GeneralRe: Organize mysql results in html table with PHP Pin
Luc Pattyn7-Mar-10 8:45
sitebuilderLuc Pattyn7-Mar-10 8:45 
GeneralRe: Organize mysql results in html table with PHP Pin
pelikan200211-Mar-10 5:05
pelikan200211-Mar-10 5:05 
GeneralRe: Organize mysql results in html table with PHP Pin
Luc Pattyn11-Mar-10 5:13
sitebuilderLuc Pattyn11-Mar-10 5:13 
GeneralRe: Organize mysql results in html table with PHP Pin
pelikan200211-Mar-10 5:19
pelikan200211-Mar-10 5:19 
AnswerRe: Organize mysql results in html table with PHP Pin
PHP_Guy19-Mar-10 7:32
PHP_Guy19-Mar-10 7:32 
QuestionInteger conversion for dummies Pin
Jack Vanderhorst6-Mar-10 4:14
Jack Vanderhorst6-Mar-10 4:14 
AnswerRe: Integer conversion for dummies Pin
Jack Vanderhorst6-Mar-10 4:31
Jack Vanderhorst6-Mar-10 4:31 
QuestionDetect when Tomcat Startup Pin
bilal.hobnail5-Mar-10 1:08
bilal.hobnail5-Mar-10 1:08 
QuestionHow to connect Tata indicom USB modem in fedora 9 Pin
Tripathi Sushant S4-Mar-10 5:56
Tripathi Sushant S4-Mar-10 5:56 
AnswerRe: How to connect Tata indicom USB modem in fedora 9 Pin
HimanshuJoshi18-Mar-10 23:20
HimanshuJoshi18-Mar-10 23:20 
QuestionMysql connectivity with C program in fedora 9 Pin
Tripathi Sushant S4-Mar-10 5:50
Tripathi Sushant S4-Mar-10 5:50 
AnswerRe: Mysql connectivity with C program in fedora 9 Pin
Graham Breach4-Mar-10 8:11
Graham Breach4-Mar-10 8:11 
QuestionEmbed php forms or flash into facebook, step by step Pin
sharkbc3-Mar-10 23:21
sharkbc3-Mar-10 23:21 
QuestionNewbie to PHP Pin
offroaderdan2-Mar-10 22:53
offroaderdan2-Mar-10 22:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.