Printing ID from database [closed] - php

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

Related

mysql update data entry in column without removing previous data [closed]

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);

Use MySQL to generate semi random string on insert [closed]

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?

Showing posted data on another website in real time [closed]

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
How i show data postet in another website to mysql database, in real time on main page of website using PHP and that any new data is displayed in a new line.
Datas that i need show are: name, and finish time (from race).
Use .setTimeout() JS method on main page of website and do jQuery.ajax() requests to your server to update data.

How to Display PHP/SQL List (the entire list) [closed]

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
I'm current browsing the website below
http://www.prc.gov.ph/licensure/?id=27
To display the list, select (any) Exam Name and Exam Date then Press Seach.
If the list is very long, it will generate Page numbers at the bottom of the page.
Is it possible if anyone can teach me how to display the entire list so that I can copy and paste it in Excel?
I am trying to get the entire list and that's it. Please help
The page above use Ajax call to fetch data, and it function paging with a limit of 20. It do not have view all. So you can not display the entire list.

Calling a field from database in MySQL [closed]

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.

Categories