Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
What I'm trying to achieve is whenever this column is updated, it shouldn't remove the previous data that has been filled, instead, it should just enter data in the next line with the previous data too.
For example
Author 1
Author 2
This is my code
$booktb = $db->update("books", "author" => $author);
I've looked into this question but it didn't work for me
Update data in mysql column field without removing previous value
pseudo code
$b = $db->select("books","author" => "kafka");
$b["title"] = "another book"
$db->insert("books",$b);
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to know if its possible to have mysql generate a semi random string when a new entry is inserted into a table.
so if my table has a column called Code , when a new record is inserted can mysql generate a random string of numbers and add that onto the end of what was inserted into code.
eg if MCQ is inserted into code , mysql will do its thing and add 123 onto it giving MCQ123
It should be possible using TRIGGER. But why not inserting the random string with the insert data?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Can someone help me how to change the bool type in phpmyadmin(interface).
e.g.
If you click button number 1, it says true and if you click button number 2 it says false.
You have to make an update statement like Eda said. To clarify, if the table is called Test and the column is called Information, the statement would read:
UPDATE Test.Information SET value = b'1'
Like this:
UPDATE `table`.`col` SET `value` = b'1';
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I created a HTML form wich is sending the data to a MYSQL/PHPmyAdmin page through a PHP section. That works fine. Every record in the DB gets a unique field (reparationID)
Based on the ReparationID I want to create a barcode and print it on a management page. Is this possible in PHP?
I have created a big button that must do the action, but i don't know how yet..
you should get id from DB and create 12 digit number with this code :
$s_number0 = str_pad( $id, 12, "0", STR_PAD_LEFT );
this code create 12 digit number
then save this code to DB and create Barcode whith this class :
http://www.shayanderson.com/php/php-barcode-generator-class-code-39.htm
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I wish to know that whether is there any possible that can allow me to delete or hide the data on my php website but when I go inside my database, the record that is being deleted will still store inside the original database?
You have to add a deleted flag to your table
For deleting you set the flag:
UPDATE table SET deleted=1 WHERE id=xy
For geting the data from the database you have to check the flag:
SELECT * FROM table WHERE deleted=0
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
return(array($clientName,$salesPer,$prospectVal,$projID));
The projectID is dynamically added in database for each entry, now how can i return the ID. As i have not set any variable in PHP to map the database field.
Can anyone guide me on this.
If you're asking how to get back the ProjectID after it has been inserted into the database and automatically assigned, I suggest using something like the following:
$projID = mysql_insert_id();
immediately after running the insert statement.