Rabu, 04 September 2013

PHP Indonesia - Facebook: #a Kalo ane buat yang kayak gini berhasil

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Marketing Mobile Apps

This online course focuses on marketing efforts that will increase your app's exposure and establish a mobile app marketing plan. Enroll today for $99.
From our sponsors
#a Kalo ane buat yang kayak gini berhasil
Sep 5th 2013, 01:44, by Khoirul Islam

Khoirul Islam 1:44am Sep 5
#a Kalo ane buat yang kayak gini berhasil
<?php
include "koneksi.php";
$tampil="SELECT SUBSTRING( headline, 1, 300 ) FROM tbl_artikel order by id_artikel";
$qryTampil=mysql_query($tampil);
while ($dataTampil=mysql_fetch_array($qryTampil)) {
$no++
?>
<?php echo $dataTampil['SUBSTRING( headline, 1, 300 )'] ;?><br>
<?php } ?>
#b Tapi Kalo Caranya Substringnya Dimasukkin ke Script Di Bawah ini Gimana ya Biar Fungsi Substringnya berjalan dengan Script Di Bwah ini?
........
$query = "SELECT * FROM tbl_artikel ORDER BY id_artikel DESC LIMIT $offset, $dataPerPage";
$result = mysql_query($query) or die('Error');
while($data = mysql_fetch_array($result))
{
echo "<div align='center'><table border='0'>";
echo "<tr><td width='500'>
<H2><a href='index.php?isi=detailartikel&id=$data[id_artikel]'>$data[judul]</a></H2><br>
$data[headline]...<br>
<div align='right'><a href='index.php?isi=detailartikel&id=$data[id_artikel]'>Read More...</a></div>
<br /></td></tr>";
}
echo "</table></div>";
........
#Mohon_Solusinya

Heri Priyatno 1:59am Sep 5
bisa begini
SELECT *, SUBSTRING( headline, 1, 300 ) as sub_headline ......

pakenya:
echo $data['sub_headline']

atau substring dari PHP nya aja

Khoirul Islam 2:08am Sep 5
kyk begini t kang ?
"SELECT *, SUBSTRING( headline, 1, 300 ) as sub_headline FROM tbl_artikel ORDER BY id_artikel DESC LIMIT $offset, $dataPerPage"

Khoirul Islam 2:11am Sep 5
Kang @Heri Priyatno
Thanks Gan
Solved

Aris Gates 2:12am Sep 5
ribet sekali kenapa tidak menggunakan substring langsung dengan php

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar