Search Results

Search found 14047 results on 562 pages for 'ctrl alt delete'.

Page 9/562 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How do I set Ctrl+Alt+something for Audacious global hokeys?

    - by Jim
    I want to set up global hotkeys in Audacious as follows. When I try and set these up it doesn't allow two mask keys. Ctrl+Alt+Insert for play. Ctrl+Alt+Home for pause. Ctrl+Alt+End for stop. Ctrl+Alt+Page Up for previous track. Ctrl+Alt+Page Down for next track. Ctrl+Alt+Up Arrow for volume up. Ctrl+Alt+Down for volume down. Ctrl+Alt+Left for skip back. Ctrl+Alt+Right for skip forward.

    Read the article

  • Remapping Alt + F2 in Unity

    - by Jesse
    I disabled the Alt + F2 default shortcut in unity (ubuntu 11.10) using ccsm and I set a new shortcut using the default system shortcut manager (system settings keyboard). And it works, until I execute a command like compiz --replace. After that, all shortcuts keep working normally, except for Alt + F2. It does nothing. Any suggetions to keep the custom Alt + F2 shortcut working after compiz --replace?

    Read the article

  • How to prevent Gnome-shell's Alt+Tab from grouping windows from similar apps?

    - by wleoncio
    I love pretty much everything about how Gnome Shell handles app-switching through Alt+Tab. My one gripe with it, though, is how it forces the user to use Alt+` to switch between windows of the same app. This is very annoying for me, because now I have to keep in mind if the last window I was using belonged to the same app as the current window or not. Definitely a nuisance for power users who thinks in terms of "windows I'm working with" instead of "applications I'm working on". I've tried the AlternateTab extension ( https://extensions.gnome.org/extension/15/alternatetab/ ), but it's looks way too ugly for me. Not to mention that in the end all I want is to remap Alt+(key above tab) to Alt+Tab on this application. I guess one option would be to just tweak Gnome-shell. My guess is that I should tinker with the altTab.js file at /usr/share/gnome-shell/js/ui/, but the file is too long and overwhelming for someone like me, who doesn't know JavaScript. Does anyone know how I can make Gnome Shell stop grouping windows by applications?

    Read the article

  • Bash script to keep last x number of files and delete the rest

    - by Brady
    I have this bash script which nicely backs up my database on a cron schedule: #!/bin/sh PT_MYSQLDUMPPATH=/usr/bin PT_HOMEPATH=/home/philosop PT_TOOLPATH=$PT_HOMEPATH/philosophy-tools PT_MYSQLBACKUPPATH=$PT_TOOLPATH/mysql-backups PT_MYSQLUSER=********* PT_MYSQLPASSWORD="********" PT_MYSQLDATABASE=********* PT_BACKUPDATETIME=`date +%s` PT_BACKUPFILENAME=mysqlbackup_$PT_BACKUPDATETIME.sql.gz PT_FILESTOKEEP=14 $PT_MYSQLDUMPPATH/mysqldump -u$PT_MYSQLUSER -p$PT_MYSQLPASSWORD --opt $PT_MYSQLDATABASE | gzip -c > $PT_MYSQLBACKUPPATH/$PT_BACKUPFILENAME Problem with this is that it will keep dumping the backups in the folder and not clean up old files. This is where the variable PT_FILESTOKEEP comes in. Whatever number this is set to thats the amount of backups I want to keep. All backups are time stamped so by ordering them by name DESC will give you the latest first. Can anyone please help me with the rest of the BASH script to add the clean up of files? My knowledge of BASH is lacking and I'm unable to piece together the code to do the rest.

    Read the article

  • Exchange 2003 Delete Specific Emails

    - by nonpoly
    Over the weekend our Exchange server was blasted with emails. Using recipient policies in the mailbox manager, how do I remove emails that are in the inbox, but coming from a specific sender (or maybe containing a specific subject?). Perhaps someone has some suggestions for another route to take aside from recipient policies, but that will affectively achieve the same end goal? Any help is much appreciated.

    Read the article

  • Vista: Alt + Shift + P opens Windows Media Player; how to delete this hotkey?

    - by NotSuper
    I just bought a new laptop, and am having to learn Vista. (My desktop has XP.) I was just trying to set some shortcut keys, and wanted to use Alt + Shift + P for Anywho.com, but to my surprise Alt + Shift + P is already taken. It calls Windows Media Player. Now I like WMP and will use it a lot, but I want my Alt + Shift + P for AnyWho.com. BTW I have PC Magazine's Hotkey Detective 2 (http://www.pcmag.com/article2/0,2817,5082,00.asp), but it doesn't show that Alt + Shift + P is taken. How to do this?

    Read the article

  • Configure (Apple) Mail to delete email from IMAP server after specified time

    - by ttarchala
    I am using a corporate mail account which is synchronized via IMAP to both my desktop client and my iPhone, which is exactly the way I like it. However, the account has a limited quota. With POP3 access, this was not a problem, as POP3 clients could be configured to remove messages from server after specified time. This option is missing from my Apple Mail IMAP account configuration pane. Is there a way to replicate this feature with an IMAP account, either on the client, or on the server side? If not, I will probably have to move old messages manually to some local folder on my Mac. Is there a method to retain a single-click searchability of both archived and current mail folders together?

    Read the article

  • An interesting case of delete and destructor (C++)

    - by Viet
    I have a piece of code where I can call destructor multiple times and access member functions even the destructor was called with member variables' values preserved. I was still able to access member functions after I called delete but the member variables were nullified (all to 0). And I can't double delete. Please kindly explain this. Thanks. #include <iostream> using namespace std; template <typename T> void destroy(T* ptr) { ptr->~T(); } class Testing { public: Testing() : test(20) { } ~Testing() { printf("Testing is being killed!\n"); } int getTest() const { return test; } private: int test; }; int main() { Testing *t = new Testing(); cout << "t->getTest() = " << t->getTest() << endl; destroy(t); cout << "t->getTest() = " << t->getTest() << endl; t->~Testing(); cout << "t->getTest() = " << t->getTest() << endl; delete t; cout << "t->getTest() = " << t->getTest() << endl; destroy(t); cout << "t->getTest() = " << t->getTest() << endl; t->~Testing(); cout << "t->getTest() = " << t->getTest() << endl; //delete t; // <======== Don't do it! Double free/delete! cout << "t->getTest() = " << t->getTest() << endl; return 0; }

    Read the article

  • Windows XP alt-tab: How to restrict options to certain applications, in certain order and exclude others?

    - by Rob
    In Windows XP Alt-tab keypress sequence to select applications, how can I ensure that certain applications always appear, in a certain order, with others always excluded? Background for asking is that most XP-based machines that I am working with on a shop floor present the list of shortcuts in a certain order and certain applications. There is one machine however, that displays an additional application. This is a hindrance to the users of the machines, as the nature of their work is routine and this variation disrupts the remembered sequence, "disrupts their flow". Thoughts? Being a good superuser, I research first before asking, and I found: Applications randomly alt-tab? (especially full screen games) Restore Alt-Tab behavior so that minimizing an app once again moves it to the end? (2. looks close to the control I need, but would need more finer, preciser control over what appears in the selection). Suggestions? (Thanks in advance.)

    Read the article

  • sqlite3 delete does not delete everything?

    - by Skand
    Whats going on here? I would expect the following delete to delete everything from the table. Is there a fundamental mis-understanding of how sqlite3 behaves on my part? sqlite .schema CREATE TABLE ip_domain_table (ip_domain TEXT, answer TEXT, ttl INTEGER, PRIMARY KEY(ip_domain, answer, ttl)); sqlite select count(*) from ip_domain_table where ttl < 9999999999 ; 1605343 sqlite pragma cache_size=100000; delete from ip_domain_table where ttl < 9999999999; sqlite select count(*) from ip_domain_table where ttl < 9999999999 ; 258 Q: Why does the count show "258"? Shouldn't it be 0 instead? If I do this instead, it deletes all the entries as expected. sqlite select count(*) from ip_domain_table; 1605343 sqlite pragma cache_size=100000; delete from ip_domain_table; sqlite select count(*) from ip_domain_table; 0

    Read the article

  • Delete ONE SPECIFIC table of a database - leave the rest intact

    - by Jayomat
    Hi, I have a database where I store two different kinds of data. One table is for favorite routes, the other stores the retrieved routes from a server. I can retrieve the routes etc just fine. But after retrieving the first Route, pressing back or HOME, and then retrieving another route, the routes table is filled with all the old routes plus the new ones. So my question: how do I delete ONLY the routes table and not the whole database because I don't want to delete the added favorites....?! I found the following function in the android docs: public int delete (String table, String whereClause, String[] whereArgs) and I tried to implement it, but I must pass a SQLiteDataBase as an argument. But how? I implemented: public void deleteTableRoutes(SQLiteDataBase db){ db.delete("routes", null, null); } But I want to call this function from a different class where I have no reference to the database.. so what do I have to pass as an argument? Or how do I get a reference to my database? I build my database upon the code example of the NotePadExample from the dev docs. How to solve this problem? thanks

    Read the article

  • C++ Beginner Delete Question

    - by Pooch
    Hi all, This is my first year learning C++ so bear with me. I am attempting to dynamically allocate memory to the heap and then delete the allocated memory. Below is the code that is giving me a hard time: // String.cpp #include "String.h" String::String() {} String::String(char* source) { this->Size = this->GetSize(source); this->CharArray = new char[this->Size + 1]; int i = 0; for (; i < this->Size; i++) this->CharArray[i] = source[i]; this->CharArray[i] = '\0'; } int String::GetSize(const char * source) { int i = 0; for (; source[i] != '\0'; i++); return i; } String::~String() { delete[] this->CharArray; } Here is the error I get when the compiler tries to delete the CharArray: 0xC0000005: Access violation reading location 0xccccccc0. And here is the last call on the stack: msvcr100d.dll!operator delete(void * pUserData) Line 52 + 0x3 bytes C++ I am fairly certain the error exists within this piece of code but will provide you with any other information needed. Oh yeah, using VS 2010 for XP. Thanks for any and all help!

    Read the article

  • c++ overloading delete, retrieve size

    - by user300713
    Hi, I am currently writing a small custom memory Allocator in c++, and want to use it together with operator overloading of new/delete. Anyways, my memory Allocator basicall checks if the requested memory is over a certain threshold, and if so uses malloc to allocate the requested memory chunk. Otherwise the memory will be provided by some fixedPool allocators. that generally works, but for my deallocation function looks like this: void MemoryManager::deallocate(void * _ptr, size_t _size){ if(_size heapThreshold) deallocHeap(_ptr); else deallocFixedPool(_ptr, _size); } so I need to provide the size of the chunk pointed to, to deallocate from the right place. No the problem is that the delete keyword does not provide any hint on the size of the deleted chunk, so I would need something like this: void operator delete(void * _ptr, size_t _size){ MemoryManager::deallocate(_ptr, _size); } But as far as I can see, there is no way to determine the size inside the delete operator.- If I want to keep things the way it is right now, would I have to save the size of the memory chunks myself? Any ideas on how to solve this are welcome! Thanks!

    Read the article

  • How To Delete objet whit mouse click ?

    - by Meko
    Hi all. I made a simple FlowChat Editor that creates rectangles and triangles and connect them each other and shows the way from up to down. I can move this elements on screen to .But I am tying to create button to delete element which I clicked. There is problem that I can delete mytriangle object but but I cant delete myRectangle objects.It deletes but not object which i clicked.I delete from first object to last ..Here my code ... if (deleteObj) { if (rectsList.size() != 0) { for (int i = 0; i < rectsList.size(); i++) { MyRect rect = (MyRect) rectsList.get(i); if (e.getX() <= rect.c.x + 50 && e.getX() >= rect.c.x - 50 && e.getY() <= rect.c.y + 15 && e.getY() >= rect.c.y - 15) { rectsList.remove(rect); System.out.println("This is REctangle DELETED\n"); } } } if (triangleList.size() != 0) { for (int j = 0; j < triangleList.size(); j++) { MyTriangle trian = (MyTriangle) triangleList.get(j); if (e.getX() <= trian.c.x + 20 && e.getX() >= trian.c.x - 20 && e.getY() <= trian.c.y + 20 && e.getY() >= trian.c.y - 20) { triangleList.remove(trian); System.out.println("This is Triangle Deleted\n"); } } }

    Read the article

  • ASP.NET Web API - Screencast series Part 3: Delete and Update

    - by Jon Galloway
    We're continuing a six part series on ASP.NET Web API that accompanies the getting started screencast series. This is an introductory screencast series that walks through from File / New Project to some more advanced scenarios like Custom Validation and Authorization. The screencast videos are all short (3-5 minutes) and the sample code for the series is both available for download and browsable online. I did the screencasts, but the samples were written by the ASP.NET Web API team. In Part 1 we looked at what ASP.NET Web API is, why you'd care, did the File / New Project thing, and did some basic HTTP testing using browser F12 developer tools. In Part 2 we started to build up a sample that returns data from a repository in JSON format via GET methods. In Part 3, we'll start to modify data on the server using DELETE and POST methods. So far we've been looking at GET requests, and the difference between standard browsing in a web browser and navigating an HTTP API isn't quite as clear. Delete is where the difference becomes more obvious. With a "traditional" web page, to delete something'd probably have a form that POSTs a request back to a controller that needs to know that it's really supposed to be deleting something even though POST was really designed to create things, so it does the work and then returns some HTML back to the client that says whether or not the delete succeeded. There's a good amount of plumbing involved in communicating between client and server. That gets a lot easier when we just work with the standard HTTP DELETE verb. Here's how the server side code works: public Comment DeleteComment(int id) { Comment comment; if (!repository.TryGet(id, out comment)) throw new HttpResponseException(HttpStatusCode.NotFound); repository.Delete(id); return comment; } If you look back at the GET /api/comments code in Part 2, you'll see that they start the exact same because the use cases are kind of similar - we're looking up an item by id and either displaying it or deleting it. So the only difference is that this method deletes the comment once it finds it. We don't need to do anything special to handle cases where the id isn't found, as the same HTTP 404 handling works fine here, too. Pretty much all "traditional" browsing uses just two HTTP verbs: GET and POST, so you might not be all that used to DELETE requests and think they're hard. Not so! Here's the jQuery method that calls the /api/comments with the DELETE verb: $(function() { $("a.delete").live('click', function () { var id = $(this).data('comment-id'); $.ajax({ url: "/api/comments/" + id, type: 'DELETE', cache: false, statusCode: { 200: function(data) { viewModel.comments.remove( function(comment) { return comment.ID == data.ID; } ); } } }); return false; }); }); So in order to use the DELETE verb instead of GET, we're just using $.ajax() and setting the type to DELETE. Not hard. But what's that statusCode business? Well, an HTTP status code of 200 is an OK response. Unless our Web API method sets another status (such as by throwing the Not Found exception we saw earlier), the default response status code is HTTP 200 - OK. That makes the jQuery code pretty simple - it calls the Delete action, and if it gets back an HTTP 200, the server-side delete was successful so the comment can be deleted. Adding a new comment uses the POST verb. It starts out looking like an MVC controller action, using model binding to get the new comment from JSON data into a c# model object to add to repository, but there are some interesting differences. public HttpResponseMessage<Comment> PostComment(Comment comment) { comment = repository.Add(comment); var response = new HttpResponseMessage<Comment>(comment, HttpStatusCode.Created); response.Headers.Location = new Uri(Request.RequestUri, "/api/comments/" + comment.ID.ToString()); return response; } First off, the POST method is returning an HttpResponseMessage<Comment>. In the GET methods earlier, we were just returning a JSON payload with an HTTP 200 OK, so we could just return the  model object and Web API would wrap it up in an HttpResponseMessage with that HTTP 200 for us (much as ASP.NET MVC controller actions can return strings, and they'll be automatically wrapped in a ContentResult). When we're creating a new comment, though, we want to follow standard REST practices and return the URL that points to the newly created comment in the Location header, and we can do that by explicitly creating that HttpResposeMessage and then setting the header information. And here's a key point - by using HTTP standard status codes and headers, our response payload doesn't need to explain any context - the client can see from the status code that the POST succeeded, the location header tells it where to get it, and all it needs in the JSON payload is the actual content. Note: This is a simplified sample. Among other things, you'll need to consider security and authorization in your Web API's, and especially in methods that allow creating or deleting data. We'll look at authorization in Part 6. As for security, you'll want to consider things like mass assignment if binding directly to model objects, etc. In Part 4, we'll extend on our simple querying methods form Part 2, adding in support for paging and querying.

    Read the article

  • SQL Developer: Describe versus Ctrl+Click to Open Database Objects

    - by thatjeffsmith
    In yesterday’s post I talked about you could use SQL Developer’s Describe (SHIFT+F4) to open a PL/SQL Package at your cursor. You might get an error if you try to describe this… If you actually try to describe the package as you see it in the above screenshot, you’ll get an error: Doh! I neglected to say in yesterday’s post that I was highlighting the package name before I hit SHIFT+F4. This works just fine, but it will work even better in our next release as we’ve fixed this issue. Until then, you can also try the Ctrl+Hover with your mouse. For PL/SQL calls you can open the source immediately based on what you’re hovering over with your mouse cursor. You could try this with “dbms_output.put_line(” too Ctrl+Click, It’s not just for PL/SQL If you don’t like the floating describe windows you get when you do a SHIFT+F4 on a database object, the ctrl+click will work too. Instead of opening a normal ‘hover’ panel, you’ll be taken directly to the object editor for that table, view, etc. Go ahead and try it right now. Paste this into your worksheet, then ctrl+click with your mouse over the table name: select * from scott.emp And now you know, the rest of the story.

    Read the article

  • Delete a div id using ajax and jquery and delete from DB

    - by Matt Nathanson
    I've got several div id's, each containing a different client. I want to be able to click the delete button and using ajax and jquery delete the specific div from the database. I'm getting success in AJAX but it's not deleting anything from the DB. And then obviously, upon deletion, I would like the container to reload dynamically. help!!! function DeleteClient(){ var yes = confirm("Whoa there chief! Do you really want to DELETE this client?"); if (yes == 1) { dataToLoad = 'clientID=' + clientID + '&deleteclient=yes', $.ajax({ type: 'post', url: '/clients/controller.php', datatype: 'html', data: dataToLoad, success: function(html) { alert('Client' + clientID + ' should have been deleted from the database.'); $('#clientscontainer').html(html); }, error: function() { alert('error'); }});}; };

    Read the article

  • Cannot Delete a SQL job.

    - by Mustafa Kapasi
    Hi, I have disabled log shipping on a SQL 2005 database and deleted the log shipping DB on the secondary server. However i cannot delete the LSRestore_DB___ job, either by T-SQL (sp_delete_log_shipping_primary_secondary, sp_delete_job) or using the management studio on the secondary server. It just wont go. The query keeps on executing for a good 7 hours. Tried disabling, still doesn't delete. Restarted the server too. Also tried the Can anyone help me delete this SQL job please ? Many Thanks

    Read the article

  • Override delete behaviour in NHibernate

    - by David
    Hi all In my application users cannot truly delete records. Rather, the record's Deleted field gets set to 1, which hides it from selects. I need to maintain this behaviour and I'm looking into whether NHibernate is appropriate for my app. Can I override NHibnernate's delete behaviour so that instead of issuing DELETE statements, it issues UPDATES, as described above? I would obviously also need to override its SELECT behaviour to include the 'AND Deleted = 0' clause. Or read from a view instead. I dunno. TIA for your advice. David

    Read the article

  • Delete temp file during finally vs delete output file during catch

    - by Russell
    This is in Java 6. I've seen more than once that people create temp files, do something, then rename it to the output file. Everything is wrapped in a try-finally block, where the temp file is deleted in finally in case something goes wrong in between. try { //do something with tempFile //do something with tempFile //do something with tempFile tempFile.renameTo(outputFile); } finally { if (tempFile.exists()) tempFile.delete() } I was wondering what are the benefits of doing that instead of doing something to the output file directly and delete it in case of exceptions. try { //do something with outputFile //do something with outputFile //do something with outputFile } catch (Exception e) { if (outputFile.exists()) outputFile.delete(); } My guess is that deleting temp files in finally benefits me when the try block can throw many kinds of exceptions. Is my guess right? What else?

    Read the article

  • Java file delete on NFS drive

    - by RenegadeAndy
    Hey guys. I am trying to delete a file on a NFS drive. I have had other problems manipulating files on remote drives such as moving a file - however i got around it by not using the conventional method i.e renameFile but instead properly using input and output streams. However using the File.delete() returns false , and I have heard suggestions on using the apache commons io FileUtils class - however it just throws an IO exception. Does anybody have any suggestions on a way to delete a file on a network mounted drive using java? Thanks

    Read the article

  • Delete page permenetly

    - by alienavatar
    Hi I deleted sharepoint page which is based on page layout through browser by going siteactions--managing content and structure-- pages-- selected the page-- delete(by right clicking). But when I see in the content database still the page is there. Basically I want to delete the content type which I could nt delete as it is being used by a page. I am getting "Content type is in use" Is there one have solution for this. Please let me know. Thanks in advance.

    Read the article

  • delete row from mysql through generated table with records

    - by HennySmafter
    I am using 2 pages. On one page it generates a table with the records and a delete button. After pressing delete it goes to the second page which should delete the record. But it doesn't. Below is the code that I am using. PS: The code is adapted from a tutorial I found through Google a while ago. delete_overzicht.php <?php // Load Joomla! configuration file require_once('../../../configuration.php'); // Create a JConfig object $config = new JConfig(); // Get the required codes from the configuration file $server = $config->host; $username = $config->user; $password = $config->password; $database = $config->db; // Connect to db $con = mysqli_connect($server,$username,$password,$database); if (!$con){ die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,$database); // Get results $result = mysqli_query($con,"SELECT * FROM cypg8_overzicht"); echo "<table border='1' id='example' class='tablesorter'><thead><tr><th>Formulier Id</th><th>Domeinnaam</th><th>Bedrijfsnaam</th><th>Datum</th><th>Periode</th><th>Subtotaal</th><th>Dealernaam</th><th>Verwijderen</th></tr></thead><tbody>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['formuliernummer'] . "</td>"; echo "<td>" . $row['domeinnaam'] . "</td>"; echo "<td>" . $row['bedrijfsnaam'] . "</td>"; echo "<td>" . $row['datum'] . "</td>"; echo "<td>" . $row['periode'] . "</td>"; echo "<td> &euro; " . $row['subtotaal'] . "</td>"; echo "<td>" . $row['dealercontactpersoon'] . "</td>"; echo "<td><a href='delete.php?id=" . $row['id'] . "'>Verwijderen </a></td>"; echo "</tr>"; } echo "</tbody></table>"; mysqli_close($con); ?> delete.php <?php // Load Joomla! configuration file require_once('../../../configuration.php'); // Create a JConfig object $config = new JConfig(); // Get the required codes from the configuration file $server = $config->host; $username = $config->user; $password = $config->password; $database = $config->db; // Connect to db $con = mysqli_connect($server,$username,$password,$database); if (!$con){ die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,$database); // Check whether the value for id is transmitted if (isset($_GET['id'])) { // Put the value in a separate variable $id = $_GET['id']; // Query the database for the details of the chosen id $result = mysqli_query($con,"DELETE * FROM cypg8_overzicht WHERE id = $id"); } else { die("No valid id specified!"); } ?> Thanks to everyone who is willing to help!

    Read the article

  • How can I disable the CTRL-ALT-DEL key combination completely on XP/Vista/7?

    - by Travesty3
    I have been googling extensively to figure this out, and nobody seems to be able to give a direct answer. Let me start by saying that I'm NOT talking about requiring CTRL-ALT-DEL to enter logon information. I'm working on a golf simulator program which is used at golf centers. I need the ability to completely disable the CTRL-ALT-DEL key sequence so that the golf center customers can't get out of the program and access the computer at all. I realize there are other key combinations that need to be handled as well, we already have this entire feature working in XP, but we're going to be switching to Windows 7 soon, and CTRL-ALT-DEL is the only one that doesn't seem to work in Win7. I'd really like an all-around solution if at all possible. This same program may also be installed on a client's personal computer for an in-home golf simulator, but the computers that really need this feature (golf center computers) are provided to the golf center by us, so would the best option be to write a new shell? I don't know anything about that at all, other than others that suggest writing a new shell for kiosk mode. I'd really like a simpler option, like modifying the registry in some way. I have heard that you can remove some buttons from the menu screen that pops up, but unless I can remove pretty much all of them (including the shutdown/restart button in the bottom-right corner), this won't be enough of a solution for me. Thanks for taking the time to read this and thanks again for any help you could provide! -Travis

    Read the article

  • How can i get my delete messages function just appear for the user's own messages left on their friends page?

    - by Hannah_B
    I had been working on this trying the delete message button to work on my own profile page of my site. When I delete a message left by a friend it not only deletes it from the screen but deletes it from the database. The messages in the database have 4 fields: message_id, from, to and message. Here is my profile view that shows how Im deleting messages from my friends: if(!empty($messages)){ foreach($messages as $message): $delete = $message['message_id']; //var_dump($message); ?> <li><?=$message['from']?> says...: "<?=$message['message']?>"(<?=anchor("home/deleteMsg/$delete", 'delete')?>)</li> //this is where the delete button appears beside messages left <?php endforeach?> <?php }else{ ?> <?php echo 'No messages left yet !!!'; }?> Here is my controller showing the deleteMsg function called: function deleteMsg($messageid) { $this->messages->deleteMsg($messageid); redirect('home'); } Here is the messages model showing the deleteMsg model itself: function deleteMsg($message_id) { $this->db->where(array('message_id' => $message_id)); $this->db->delete('messages'); } Here is my friendprofile view where I want to implement the delete message command just so the button appears for messages Ive left and I can delete them. The delete button will not appear beside other friends comments on this page: <li><?=$message['from']?> says...: "<?=$message['message']?>"</li> Now I've tried creating a new delete Message function to no success so far, am I better off doing this than calling the same function? As this didnt work either.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >