Hello everyone.
I’m having this issue, I get duplicated columns when I try to display the results from a mysql table using pdo_mysql.
Here’s the code:
[php]
<?php $user = "******"; $pass = "*******************"; $dbh = new PDO('mysql:host=***.***.***.***;dbname=*****', $user, $pass); ?>column1 | column2 | column3 | column4 | column5 | column6 |
'; echo $col; echo ' | '; } echo '
[/php]
I’m getting something like this.
[table]
[tr]
[td]column1[/td][td]column2[/td][td]column3[/td][td]column4[/td][td]column5[/td][td]column6[/td]
[/tr]
[tr]
[td]result1[/td][td]result1[/td][td]result2[/td][td]result2[/td][td]result3[/td][td]result3[/td][td]result4[/td][td]result4[/td][td]result5[/td][td]result5[/td][td]result6[/td][td]result6[/td]
[/tr]
[/table]
I’ve been struggling with this for hours, googled a lot and found nothing yet. I’d so much appreciate any help!