Find Jobs
Hire Freelancers

PHP insert data into SQLite3 using stmt & bindParam/bindValue

$30-250 USD

已完成
已发布大约 4 年前

$30-250 USD

货到付款
I am trying to build a PHP form that reads and writes to a SQLite3 database. The reading part is done but the writing part is not working because my approach was all wrong. I have the code below that results in inserting a string wrapped json blob which is not correct. I need an experienced SQLite3 programmer to do this the correct way which would be a prepared statement would need to be created with the payload added to the statement via the Sqlite3 bindParam/bindValue . I would like to get this done today if possible. I need the array of data inserted into the db (db is attached) if (isset($_POST['send'])){ $newid = ("12345"); $utc = date("Y-m-d H:i:s"); $to = $_POST['to']; $from = $_POST['from']; $text = $_POST['text']; $array['params']['CMD'] = " MSG "; $array['params']['DIAL'] = 144178000; $array['params']['FROM'] = $from; $array['params']['OFFSET'] = 500; $array['params']['PATH'] = $to; $array['params']['SNR'] = -5; $array['params']['SUBMODE'] = 0; $array['params']['TDRIFT'] = 0; $array['params']['TEXT'] = $text; $array['params']['TO'] = $to; $array['params']['UTC'] = $utc; $array['params']['_ID'] = $newid; #$array['params']['type'] = STORE; #$array['params']['value'] = ""; $data = json_encode($array); $insert = $db->query("INSERT INTO inbox_v1 (blob) VALUES('".$data."'),("type"":""STORE")"); } The above code results in : {"params":{"CMD":" MSG ","DIAL":144178000,"FROM":"W5DMH","OFFSET":500,"PATH":"KD8PGB","SNR":-5,"SUBMODE":0,"TDRIFT":0,"TEXT":"test at 07:46 02-12-2020","TO":"KD8PGB","UTC":"2020-02-12 17:47:09","_ID":"12345","type":"STORE","value":""}} A correct entry would look like this (note the bracket locations) : {"params":{"CMD":" MSG ","DIAL":144178000,"FROM":"W5DMH","OFFSET":0,"PATH":"W5DMH","SNR":0,"SUBMODE":0,"TDRIFT":0,"TEXT":"test at 07:46 02-12-2020","TO":"KD8PGB","UTC":"2020-02-12 12:31:50","_ID":"12345"},"type":"STORE","value":""}
项目 ID: 23872220

关于此项目

11提案
远程项目
活跃4 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hello, there. I have read your job description carefully. I am senior React developer and I have 5+ years of experience Php, SQLite and Mysql. I am sure that I can do your job perfectly in 1 hour. Looking forward to hearing from you. Thank you.
$60 USD 在1天之内
4.9 (21条评论)
5.4
5.4
11威客以平均价$95 USD来参与此工作竞价
用户头像
Hi i can insert data into SQLite3 i am expert at PHP , Javascript , MySQL , HTML , SQLite So send me Private message at PMB so we can discuss more about it Thanks
$110 USD 在1天之内
4.7 (555条评论)
8.4
8.4
用户头像
Hello! This project is very interesting for me and perfect fit with my skills. I am available now and can start immediately. Hope to work with you and also i am expert at PHP , Javascript , MySQL , HTML , SQLite Best Regards
$80 USD 在1天之内
4.8 (481条评论)
8.3
8.3
用户头像
I can set your query to insert the data into the database. My average project completion time is within 3-5 hours on the same day. The skills I have include PHP, HTML5, CSS3, JavaScript, jQuery, WordPress Themes & Plugins, Web Scrapers & Automation Bots, User Scripts, Macros, and much more. If you have any questions or concerns. Feel free to message me via chat to clarify any details.
$60 USD 在1天之内
4.9 (261条评论)
7.0
7.0
用户头像
Your project will be done today. Hi Client High-quality & Fast-delivery is promised! As a highly skilled full stack developer and I can help you perfectly. I am very confident with my skills and I'd like to help your business by doing my best. My clients have never been frustrated with my work and I hope to make you one of them. Please confirm that I am one of the best fits for you and drop me a message for further discussion. Thanks and Best Regards. George
$150 USD 在1天之内
4.9 (28条评论)
6.8
6.8
用户头像
Hello , I have read your project description carefully, I am an experienced developer and UI Developer of PHP with 6 years of experience. I am expert in PHP's most popular framework Codeigniter and Laravel. I can build and update your website with most updated solutions.. I am also good in the following skills, HTML, Javascript, MySQL, PHP, SQLite. Please Send me a message so that we can discuss more about this project...
$155 USD 在7天之内
5.0 (77条评论)
6.1
6.1
用户头像
Hi, I've core expertise in Php and would love to Create a PHP form that reads and writes to a SQLite3 database for you on time and within your budget. Website design and development work portfolio: https://www.freelancer.com/u/webdroid Skills and expertise: HTML5 , CSS3, JAVASCRIPT,Jquery ,Bootstrap,ajax,PHP ,Mysql ,Laravel ,Codignator,ecommerce ,UI UX, API integration, payment module integration,Web scrapping. Let's connect in chat
$130 USD 在2天之内
4.8 (34条评论)
5.9
5.9
用户头像
Hi there. I checked all code you attached and I am sure I can complete your project perfectly by tomorrow. As I have good skill with PHP and MySQL, I can handle your project than anyone else. Don't hesitate to contact with me. Thanks and Best Regards.
$120 USD 在2天之内
5.0 (18条评论)
5.4
5.4
用户头像
Hi there as i'm interested in your project i wrote this proposal to propose to you my services as web developer with more than 5 years of experience with php looking forward to hear from you. <?php echo "Thanks for attention."; ?>
$30 USD 在1天之内
5.0 (33条评论)
4.1
4.1
用户头像
As a full-stack developer, I have powerful expertise in database design and development. I am sure I can handle your project perfectly in the quick timeline. Please message me if you have time to discuss more details further. Looking forward to hearing from you as soon. Sincerely
$50 USD 在1天之内
5.0 (2条评论)
2.8
2.8

关于客户

UNITED STATES的国旗
Shelby Township, United States
5.0
9
付款方式已验证
会员自2月 3, 2007起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。