PHP School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a PHP Expert!

Join 307,155 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,546 people online right now. Registration is fast and FREE... Join Now!




Accessing data from sqlserver using ADOdb Connection Plz Help

 

Accessing data from sqlserver using ADOdb Connection Plz Help

amulmanu

18 Aug, 2009 - 03:21 AM
Post #1

New D.I.C Head
*

Joined: 2 Aug, 2009
Posts: 19


My Contributions
Hi firends...
I'm AMAR i have a doubt that i wrote a php code for mysql and its working success and now i need to migrate from it to sqlserver of ADOdb Connections...
kk can u plz help me on seeing this code using php-sqlserver 2005 using ADOdb connection...

I have an image for my project .. plz find the attachement and check that the VEHICLEID dropdown menu code only i placed because it's not working..
when i did in mysql it works.. y is it so ..

and also plz give me any liks to read the ADOdb Connections and things....


CODE

$vehlist1 = "SELECT DISTINCT sch_id, veh_no  FROM {$table}";
$vehlist = $conn->Execute($vehlist1);
$num_columns = $vehlist->Fields->Count();

echo "<p class='innerhead'>Schedule Tracking Info..</p>";
echo "<form name='frmschinfo' method='post' action='schtracking_storedatatest1.php' onSubmit='return accept()'>";
echo "<table width='800px', border='0'><tr>";
echo "<td class='gentext' width='150px'>$vehicleid</td>";
echo "<td class='gentext' width='100px'><select id='strvehicle' name='strvehicle' onchange='Choice(); fn(this);'>";
for ($k=1; $k < $num_columns; $k++) {
    $fields[$k] = $vehlist->Fields($k);
}
echo "<option value=0> --Select -- </option>";

while($row1 = $vehlist->GetArray())
{
?>
                <option value="<?php echo $row1[veh_no];?>" title="<?php echo $row1[sch_id];?>" <?php if($row1[veh_no]==$test) echo 'selected';?>>
        <?php echo $row1[veh_no];?>      </option>

                <!--echo "<option value=\"$row1[veh_no]\" title=\"$row1[sch_id]\" >$row1[veh_no]</option>";-->

<?php
}
echo "</select></td>";
echo "<td class='gentext' width='50px'>$space</td>";
echo "<td class='gentext' width='150px'>$scheduleid</td>";
echo "<td class='gentext' width='70px'><input name='txtschid' id='txtschid' type='text' size='25' maxlength='50' value='{$test1}' readonly='readonly'/></td>";
echo "<td class='gentext' width='50px'>$space</td>";
echo "<td class='gentext' width='80px'>$date</td>";
echo "<td class='gentext' width='70px'><input name='txtdate' type='text' id='txtdate' size='20' maxlength='30' onclick='ds_sh(this);' /></td>";
echo "<td width='50px'> </td>";
echo "</tr>";
echo "<tr><td class='gentext'> </td>";
echo "<td class='gentext' width='100px'> </td>";
echo "</tr>";
echo "<tr><td colspan='5' class='redtext'>$success1</td></tr>";
echo "<tr><td> </td></tr>";
echo "</table>\n";
$vehlist->Close();
$vehlist = null;
}
else echo "ADODB not connected";


After that i want to write code for all the columns...
the first dropdown list is not working...


NOTE: when i click the VEHICLE ID frop down menu then the Lower columns should automatically populate so plz through me out from this probelm

Thanks In Advance..

This post has been edited by amulmanu: 18 Aug, 2009 - 08:18 PM


Attached thumbnail(s)
Attached Image
User is offlineProfile CardPM
+Quote Post


Posts in this topic

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 05:33PM

Live PHP Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month