Find Jobs
Hire Freelancers

Pass a database recordset to a string variable in php

$10-30 USD

Tamamlandı
İlan edilme: yaklaşık 6 yıl önce

$10-30 USD

Teslimde ödenir
Issues with the code below: current issue is I am trying to get the entire database recordset into the $message variable, it's placement currently means it's not looping through records and I can't think how to do it. So, I need the entire recordset, all fields and rows passed to the $message variable. <?php $servername = "localhost"; $username = "root"; $password = "yeahyeah"; $dbname = "transport"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT * FROM tmpdiscounts"; $result = $conn->query($sql); function send_line_notify($message, $token) { $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "[login to view URL]"); curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt( $ch, CURLOPT_POST, 1); curl_setopt( $ch, CURLOPT_POSTFIELDS, "message=$message"); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); $headers = array( "Content-type: application/x-www-form-urlencoded", "Authorization: Bearer $token", ); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec( $ch ); curl_close( $ch ); return $result; } if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $msg = "id: " . $row["idtmpdiscounts"]. ", "; } } else { echo "0 results"; } $message = $msg; $token = 'FRkMjKH2zqFv4j8Ge1hRNg4Hb8j3sRIAUFV8QZVBfEl'; echo send_line_notify($message, $token); $conn->close(); ?>
Proje No: 16139112

Proje hakkında

18 teklif
Uzaktan proje
Son aktiviteden bu yana geçen zaman 6 yıl önce

Biraz para mı kazanmak istiyorsunuz?

Freelancer'da teklif vermenin faydaları

Bütçenizi ve zaman çerçevenizi belirleyin
Çalışmanız için ödeme alın
Teklifinizin ana hatlarını belirleyin
Kaydolmak ve işlere teklif vermek ücretsizdir
Seçilen:
Kullanıcı Avatarı
Hello, After reviewing your project, I’d love to discuss in more detail with you to ultimately understand your needs more. Relevant Skills and Experience I have more than 3 years of professional experience in PHP, CSS, HTML, JS, Jquery, Bootstrap, Ajax,Wordpress. I will start the work as soon as you confirm and complete it before mentioned deadline. [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL]
$10 USD 1 gün içinde
4,8 (113 değerlendirme)
6,0
6,0
18 freelancers are bidding on average $19 USD for this job
Kullanıcı Avatarı
I would be interested to help you with this
$30 USD 0 gün içinde
5,0 (63 değerlendirme)
5,7
5,7
Kullanıcı Avatarı
Hello there, I would like to be considered for this job as I have great working experience in PHP, MYSQL, HTML, CSS and JavaScript/jQuery development. Thanks, Ramesh
$20 USD 1 gün içinde
5,0 (24 değerlendirme)
5,5
5,5
Kullanıcı Avatarı
Hi, I am experienced web app developer and best in PHP and databases SQL, MySQL etc. let me solve your problem. i will do it now.
$20 USD 0 gün içinde
5,0 (16 değerlendirme)
4,7
4,7
Kullanıcı Avatarı
Hi There, I love to do this project. I have done these type projects. Message me for more details. We can discuss more over chat.
$15 USD 1 gün içinde
4,5 (24 değerlendirme)
4,5
4,5
Kullanıcı Avatarı
Hi why don't you push data into multidimensional array. I can help you in this regard quickly Thanks
$15 USD 1 gün içinde
5,0 (14 değerlendirme)
3,7
3,7
Kullanıcı Avatarı
Hello sir, I have well experience in P.H.P data driven web development. I can write the J.S.O.N string from My-SQL record-set I expect at least $5 and 1 day to complete. You can leave message over chat-box. Awaiting reply, Thank you
$10 USD 1 gün içinde
5,0 (3 değerlendirme)
2,1
2,1
Kullanıcı Avatarı
can fixed in half an hour
$15 USD 1 gün içinde
5,0 (4 değerlendirme)
2,0
2,0
Kullanıcı Avatarı
A proposal has not yet been provided
$20 USD 3 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
I help you with your PHP script. I have worked with PHP since 2008 and professionally since 2012 so I know how to fix your issue.
$15 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0
Kullanıcı Avatarı
Hi, I will love to have opportunity to fulfill your project. My Goal is to earn 5 review from you and I believe that I can do it in a best way than others. I guaranteed you will be glad to see my amazing work. Now I am waiting look for your response. Thanks
$25 USD 1 gün içinde
0,0 (0 değerlendirme)
0,0
0,0

Müşteri hakkında

   THAILAND bayrağı
bangkok, Thailand
5,0
69
Ödeme yöntemi onaylandı
May 8, 2014 tarihinden bu yana üye

Müşteri Doğrulaması

Teşekkürler! Ücretsiz kredinizi talep etmeniz için size bir bağlantı gönderdik.
E-postanız gönderilirken bir şeyler yanlış gitti. Lütfen tekrar deneyin.
Kayıtlı Kullanıcı İlan Edlien Toplam İş
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ön izleme yükleniyor
Coğrafik konum için izin verildi.
Giriş oturumunuzun süresi doldu ve çıkış yaptınız. Lütfen tekrar giriş yapın.