change column widths in mysql query

Posted by addi on Stack Overflow See other posts from Stack Overflow or by addi
Published on 2010-05-24T22:57:36Z Indexed on 2010/05/24 23:01 UTC
Read the original article Hit count: 274

Filed under:
|
|
<?php

// Connection Database
$search = $_POST ['Search'];

mysql_connect("xxxxxx", "xxxxxxxxx", "xxxxxx") or die ("Error     Connecting to Database");
      mysql_select_db("xxxxxx") or die('Error');
     $data = mysql_query("SELECT* FROM course WHERE MATCH (CourseName, CourseDescription,   CourseLeader) AGAINST ('". $search ."')")
      or die (mysql_error());
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>Course Name:</th> <td>".$info['CourseName'] . "</td> ";
Print "<th>Course Description:</th><td>".$info['CourseDescription'] . "</td> ";
Print "<th>Course Leader:</th><td>".$info['CourseLeader'] . " </td></tr>";

}
Print "</table>";

?>

In my php code I print the columns CourseName, CourseDescription, CourseLeader after a search, as a resultset. CourseDescription has a lot of text, how do I print it all? is there a way to change the column widths?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql