| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL tutorial description prob
Hello, I am working on a tutorial site as most of you might know. I have a sql database set with pretty much everything working. But I am trying to find way in order to make a new <td> in php. Lemme go into farther detail:
The sql database connects and finds tutorial descriptions for the category given. It then displays info in a new <td>. So, if the descriptions it finds equals 2, it creates 2 td's and fills the given areas. now is this even possible. Or am I over my head? |
|
#2
|
|||
|
|||
|
Im not really understanding you correctly, you mean make a new table td?
if so, Im sure its possible but would need more information like the query / loop etc. |
|
#3
|
|||
|
|||
|
Ok, imma try to explain. I kinda rushed it. Here we go:
I want to have a page where a SQL database selects categorys and the descriptions for the tutorials contained in the category. It selects it by the following code. Code:
SELECT * FROM tut_descr WHERE tut_cat='$cat' LIMIT 30 Now, I am pretty sure that will work. Now how would I show each of the rows selected in seperate td's ? |
|
#4
|
|||
|
|||
|
while ($row = mysql_fetch_assoc(mysql_query($query))) {
echo $row['id'] } would echo all ids etc. id is a column name, you can put html in there and put the $row['****'] in between to show in different areas etc. |
![]() |
| Viewing: Tutorialized Forums > Databases > SQL Basics > SQL tutorial description prob |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|