sankarkarthikeyan
-
Posts
7 -
Joined
-
Last visited
Never
Posts posted by sankarkarthikeyan
-
-
Thanks mate it worked like charm
-
Hi friends i need a small help in importing csv files into mySQL database table i tried all possible options but i am no where... here is the example for what i am trying to do
Mysql DB name = raw Table name is = dump
+--------------------+--------------------+
+ Account + Bal +
+--------------------+--------------------+
+ + +
+--------------------+--------------------+
CSV Format
50************13, 11095
When they upload the file it should automatically get inserted into appropriate fields any help would be great
i tried all possible scripts found in the net could nothing is happening
-
This is my HTML Coding thanks for your help people
if ($result) { echo '<table id="ticket"> <tr> <th align="left"><b>Ticket No:</b></th> <th align="left"><b>Name:</b></th> <th align="left"><b>Issue:</b></th> <th align="left"><b>Status:</b></th> <th align="left"><b>view</b></th></tr>'; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo '<tr><td align="left">' . $row['id'] . '</td> <td align="left">' . $row['name'] . '</td> <td align="left">' . $row['product'] . '</td> <td align="left">' . $row['status'] . '</td> <td align="left"><a href="completeview.php?id=' . $row['id'] . '">View</a></td></tr>'; } } else { echo "Oops! No data found"; } echo '</table>';
status: Queued :Red Processing :Amber Packed :Pale green Shipped : Green Returned : Grey
-
Thanks brother let me try this and get back to you
-
Hi php freaks i am new to php im doin a small project to handle tickets created by customers now i want to change the font color based on the status for
example:
ID + Name + Product + Status
------------------------------------------------------------------------------------------------------------------------------------
1111 + abcdef + bat + processing
----------------+--------------------------------------+------------------------------------------+------------------------------
i can connect to database and fetch it the only place i need help is changing the any help would be very helpful
thanks in advance
-
Can you help me with where im going wrong here in this code this with a search function
i am see the out put with pagination view however $id is not getting captured as the link id any help would be appreciated
<form name="frmSearch" method="get" action="<?=$_SERVER['SCRIPT_NAME'];?>">
<table id="tic"> <tr>
<td>Ticket No | Emp ID:</td><td><input name="txtKeyword" type="text" id="txtKeyword" value="<?=$_GET["txtKeyword"];?>"></td>
<td><input type="submit" name="submit" value="Search"></td>
</tr>
</table>
</form>
<?
if($_GET["txtKeyword"] != "")
{
$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
$objDB = mysql_select_db("ticket");
$result = "SELECT * FROM data WHERE (employee LIKE '%".$_GET["txtKeyword"]."%')";
$objQuery = mysql_query($result) or die ("Error Query [".$result."]");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 5; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$result .=" order by stamp LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($result);
?>
<table id="ticket" <tr>
<th> <div align="center">Ticket No</div></th>
<th> <div align="center">Date</div></th>
<th> <div align="center">Issue Type</div></th>
<th> <div align="center">Status</div></th>
<th> <div align="center">view</div></th>
</tr>
<?
while($row = mysql_fetch_array($objQuery))
{
?>
<tr>
<td><div align="center"><?=$row["id"];?></div></td>
<td><div align="center"><?=$row["stamp"];?></div></td>
<td><div align="center"><?=$row["issue"];?></div></td>
<td><div align="center"><?=$row["status"];?></div></td>
<td><div align="center"><a href="edit.php?id='$row['id']'">Update</a></div></td>
</tr>
<?
}
?>
</table>
<br>
Total <?= $Num_Rows;?> Record : <?=$Num_Pages;?> Page :
<?
if($Prev_Page)
{
echo " <a href='$_SERVER[sCRIPT_NAME]?Page=$Prev_Page&txtKeyword=$_GET[txtKeyword]'>Back</a> ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ <a href='$_SERVER[sCRIPT_NAME]?Page=$i&txtKeyword=$_GET[txtKeyword]'>$i</a> ]";
}
else
{
echo "<b> $i </b>";
}
}
if($Page!=$Num_Pages)
{
echo " <a href ='$_SERVER[sCRIPT_NAME]?Page=$Next_Page&txtKeyword=$_GET[txtKeyword]'>Next</a> ";
}
mysql_close($objConnect);
}
?>
Importing CSV File to mysql Database table
in PHP Coding Help
Posted
thanks mate