Jump to content

ProSpartan

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ProSpartan

  • Rank
    Newbie
  • Birthday November 4

Profile Information

  • Location
    Rocket City USA
  • Interests
    Programming, Computers, Building, Creating, Networking, Fun.
  1. Yes, i have seen that page already. It did work, if I remember correctly when I used it, but the program needs to find a specific char, "@", and replace it with the addin field { SEQ }.
  2. Okay, I've searched and searched and am hoping someone here can help me out. I've been trying to get a VBScript program to open a word document, search for a specific char and replace it with a Addin field (i.e. { SEQ @ } ) Here's what I have thus far: Const wdReplaceAll = 2 Set objWord = CreateObject("Word.Application")objWord.Visible = TrueSet ObjDoc = objWord.Documents.Open("C:\path\to\.doc")Set objSelection = objWord.Selection With objSelectionobjSelection.Find.Text = "@"objSelection.Find.Forward = TrueobjSelection.MatchWholeWord = TrueobjSelection.Find.Replace.Text = "replacement text"ob
  3. ProSpartan

    PHP Database

    Okay, thanks. It worked.
  4. ProSpartan

    PHP Database

    I'm back with a new problem, haha. When i enter text into the textarea of my html page to submit it to the list, but what it does not like is when i use an apostrophe. the error i get is: Error: You have an error in your SQL syntax; check tge manual that corresponds to your MySQL server version for the right syntax to use near ' some text about the input ) ' at line 1. Any thoughts of what could be done?
  5. ProSpartan

    PHP Database

    Thanks. That's all the question i have for now. Thanks everyone who helped me on this project. Couldn't have done it without all y'all!
  6. ProSpartan

    PHP Database

    Okay, but then if the table is empty, i don't really want to be adding task 57 of 1 task. Okay, i'll keep this in mind for when i make a database with users. But over time, the database will get bigger, taking up more space, so deleting the entry will help with disk space management. So back to my three question that i asked,1. which was answered.2. Resetting AUTO_INCREMENT3. From tasks x, how do i decrease the numbers up from there, tasks x, up.eg for 3. I delete tasks x. I want tasks x+1, x+2, x+3, x+4 to be decreased down to x, x+1, x+2, x+3. how? As for this, do i assign it to a vari
  7. ProSpartan

    PHP Database

    Okay... After much work on this and help from everyone, i've gotten the insert and viewTasks completed. Now, i need help with another problem that has risen. I created a delete.php for deleting tasks in the list. i've gotten to where it will delete the task from the list via and AUTO_INCREMENT number. 1. How do I check to see if the table has nothing in it (empty)?2. How do I reset the AUTO_INCREMENT?3. In thinking of future, how do I delete a task from w number, and decrease the AUTO_INCREMENT number from there Number 3 example: I have 10 tasks. I delete number 4 from the table. How do i dec
  8. ProSpartan

    PHP Database

    Okay, i got them to show up. phpMyAdmin does not work. No idea why. It is now that i fixed the while loop.
  9. ProSpartan

    PHP Database

    index.html <html><head><title>Tasks to Complete</title></head><body><table border="1" width="100%" height="100%"><tr width="100%" height="10%"> <td colspan="2" height="10%"> <h2 align="center">Welcome to the Task List</h2> </td></tr><tr width="100%" height="90%"> <td width="50%" height="100%"> <form action="insert.php" method="post"> <fieldset> <legend>Insert Tasks Here:</legend> <textarea rows="15" cols="50" name="task"></textarea> </br> </br&g
  10. ProSpartan

    PHP Database

    Yeah, the error handeling is still there, but i get no errors. I added a return button to return back to index.html which is where an iframe pulls the viewTasks.php via src. <iframe width="100%" height="100%" src="viewTasks.php"> </iframe> Could it be that?
  11. ProSpartan

    PHP Database

    I've followed the examples step by step. insert.php mysql_select_db('tasks', $con);$sql = "INSERT INTO tasks.taskstable (task, importance, dateAssigned, timeAssigned) VALUES ('$_POST[task]', '$_POST[importance]', '$_POST[date]', '$_POST[time]')"; viewTasks.php mysql_select_db("tasks", $con);$result = mysql_query("SELECT * FROM tasks.taskstable");while($row = mysql_fetch_array($result));{ echo "<tr>"; echo "<td>" . $row['task'] . "</td>"; echo "<td>" . $row['importance'] . "</td>"; echo "<td>" . $row['dateAssigned'] . "</td>"; echo "<td>" . $row[
  12. ProSpartan

    PHP Database

    $con = mysql_connect("localhost", "root", ""); Yeah, i noticed that as well, so i fixed it. It is tasksTable. will $result = mysql_query("SELECT * FROM tasks.db.tasksTable"); work?
  13. ProSpartan

    PHP Database

    Okay, it was the username/password. So the database is created db.opt and the table, taskstable.frm. I got one record added, but the taskView.php does not show the records.
  14. ProSpartan

    PHP Database

    Okay, what do i do? Just take the .mdb off? I think my error was in that my html was not opening/calling the connect.php, which would make it to where the database is not created. But now i am getting an error where i cannot create the database. Error creating database: Access denied for user ''@'localhost' to database 'tasks' Do i need to be the admin of the computer?
  15. ProSpartan

    PHP Database

    As far as i know, i've done everything correctly. Nothing looks wrong. The code for connecting/creating the database. (connect.php) <html><body><?php$conn=mysql_connect('localhost','','');if(!$conn){die('Could not connect: ' . mysql_error());}if(mysql_query("CREATE DATABASE tasks", $conn)){echo "Database Created";}else{echo "Error creating database: " . mysql_error();}mysql_select_db("tasks.mdb", $conn);$sql = "CREATE TABLE tasksTable(taskNumber int NOT NULL AOUT_INCREMENT,PRIMARY KEY(taskNumber),task Text,importance Text,dateAssigned Text,timeAssigned Text)";mysql_query($sql,
×
×
  • Create New...