Jump to content

jat421

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jat421's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I got it working thanks for your help! I assigned $row[1] to a variable and provided that as a sql delete paramater. Just one more question. I want only one person reading and writing to the table at one time. How can that be done? Thanks!
  2. oh yes you are right $row is after. I couldn't possible use that duhh. Thanks!
  3. Just trying to display the first row and once it's displayed delete the first row from the database. Thanks!
  4. Hi, I am trying to delete a row that has be read. Below is the code. I can't figure out how to delete it after it has been printed on the screen. Any help is much appreciated. Thanks! <?php echo "Today is " . date("Y/m/d"); $server = "Computer\\test"; $options = array( "UID" => "sa", "PWD" => "root", "Database" => "SetNo" ); $conn = sqlsrv_connect($server, $options); if ($conn === false) die("<pre>".print_r(sqlsrv_errors(), true)); $result=sqlsrv_query($conn, "select * from tblCus"); [color=red]$delete=sqlsrv_query($conn, "delete from tblCus where result.row[1]");[/color] $row = sqlsrv_fetch_array($result); echo "<br />"; echo "<br />"; echo "<br />"; echo "Number:" . " " . $row[1]; echo "<br />"; sqlsrv_close($conn); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.