Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Anonymous User
What I am finding difficult September 28, 2012 10:37AM |
Rating: 0 |
Re: What I am finding difficult September 28, 2012 11:19AM |
Registered: 11 years ago Posts: 43 Rating: 0 |
Anonymous User
Re: What I am finding difficult September 28, 2012 12:34PM |
Rating: 0 |
Re: What I am finding difficult September 28, 2012 07:59PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Re: What I am finding difficult September 28, 2012 10:29PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Anonymous User
Re: What I am finding difficult September 30, 2012 12:03PM |
Rating: 0 |
Re: What I am finding difficult October 01, 2012 08:00AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Anonymous User
Re: What I am finding difficult October 01, 2012 08:22AM |
Rating: 0 |
Re: What I am finding difficult October 01, 2012 03:54PM |
Registered: 11 years ago Posts: 39 Rating: 0 |
Anonymous User
Re: What I am finding difficult October 03, 2012 08:50AM |
Rating: 0 |
Re: What I am finding difficult October 04, 2012 12:22AM |
Registered: 11 years ago Posts: 39 Rating: 0 |
Anonymous User
Re: What I am finding difficult October 04, 2012 08:02AM |
Rating: 0 |
Re: What I am finding difficult October 04, 2012 10:47AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHPecho "<table border=';1';> <tr bgcolor=';#cccccc';><td>Book title</td><td>Author name</td><td>Author surname</td><td>Price</td><td colspan=';2';>Action</td></tr>"; //put the table header column outside the loop ……//query statement here while($row = mysql_fetch_array($result)){ // the loop part of your query $book_id=$row[';book_id]; // I want to use this later in a hidden field echo "<tr><td>"; //put the table rows inside the loop, and draw the information from the db into a table row, one at a time echo $row[';title';]; echo "</td><td>"; echo $row[';auth_name';]; echo "</td><td>"; echo $row[';auth_surname';]; echo "</td><td>"; echo $row[';price';]; echo "</td><td>"; echo "<a href=edit.php?book_id=$book_id&update=yes>Edit</a>"; echo "</td><td>"; echo "<a href=delete.php?book_id=$book_id&delete=yes>Delete</a>"; echo "</tr>"; } echo "</table>"; //end the table outside the loop
Re: What I am finding difficult October 04, 2012 03:43PM |
Registered: 11 years ago Posts: 207 Rating: 2 |
Re: What I am finding difficult October 04, 2012 04:00PM |
Registered: 11 years ago Posts: 207 Rating: 2 |
Anonymous User
Re: What I am finding difficult October 04, 2012 09:01PM |
Rating: 0 |
Re: What I am finding difficult October 05, 2012 08:20AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHP//insert ..array of data sent from form (if more than one course that is selected and needs to be inserted) ..array loop start to extract data from the array ....query 1 to insert into table 1... .....get the ID generated in the last with query mysql_insert_id... .....query 2 to insert ID into table 2 ..array loop ends //PHP nested queries to extract data (not good but just to get into the logic) ...query 1 to extract data ...while loop ...get data ......... query 2 to extract data from another table using the data above .............while loop .............get data .............end while loop ...end while loop // nested mysql SELECT * FROM mytable WHERE ID in (SELECT ID FROM other table);
Language: PHP<input type="text" name="cname" value="<?php echo "$cname"; ?>"> //or echo "<input type=\"text\" name=\"cname\" value="$cname">";
Re: What I am finding difficult October 05, 2012 09:42AM |
Registered: 11 years ago Posts: 207 Rating: 2 |
After that I want to isert that id/variable into student_course table, the courses are populated into checkboxes which is working, I would then like to have an array capture this data, then loop through this array inserting the student id foreach course and course id into student_course.Language: PHP$id=mysql insertid();
Re: What I am finding difficult October 05, 2012 10:00AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: What I am finding difficult October 05, 2012 10:36AM |
Registered: 11 years ago Posts: 207 Rating: 2 |
Anonymous User
Re: What I am finding difficult October 09, 2012 08:16PM |
Rating: 0 |
Re: What I am finding difficult October 09, 2012 09:11PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Re: What I am finding difficult October 10, 2012 06:03PM |
Registered: 11 years ago Posts: 31 Rating: 0 |
Anonymous User
Re: What I am finding difficult October 10, 2012 08:01PM |
Rating: 0 |
Re: What I am finding difficult October 16, 2012 12:44PM |
Registered: 11 years ago Posts: 43 Rating: 0 |
Re: What I am finding difficult October 16, 2012 06:57PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Re: What I am finding difficult October 17, 2012 09:30AM |
Registered: 11 years ago Posts: 43 Rating: 0 |
Re: What I am finding difficult October 19, 2012 10:12AM |
Registered: 15 years ago Posts: 79 Rating: 0 |
Re: What I am finding difficult October 19, 2012 12:51PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Re: What I am finding difficult October 19, 2012 01:46PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHP//either INSERT INTO table (fieldname1, fieldname2) VALUES.... //or INSERT INTO table values (fieldname1, fieldname1, ';';.... the latter for empty fields
Re: What I am finding difficult October 19, 2012 03:14PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Re: What I am finding difficult October 20, 2012 03:42AM |
Registered: 15 years ago Posts: 79 Rating: 0 |
Re: What I am finding difficult October 23, 2012 10:27PM |
Registered: 11 years ago Posts: 100 Rating: 0 |
Re: What I am finding difficult October 23, 2012 11:37PM |
Registered: 11 years ago Posts: 78 Rating: 0 |