masrawy Posted February 18, 2009 Author Share Posted February 18, 2009 sir i need it to print in this table<table border="0" width="100%" bordercolor="#FFFFFF" cellpadding="2" height="71"><tr><td width="26%" height="15" bgcolor=#efe8d6><b><span lang="ar-eg">اسم المستخدم</span></b></td><td width="85%" height="15" align="right" bgcolor="#efe8d6"><? echo " {$row['name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">تاريخ العضوية</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['date']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الإعلانات</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['countt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المتجر الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['m_name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المنتدى الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['ccoounttt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b>البريد الإليكتروني</b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['email']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الدولة</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['country']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المدينة</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['city']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الجوال</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['mobile1']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الهاتف</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['tel']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">طرق اتصال أخرى</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? $another_ways=nl2br($another_ways);?> <? echo "{$row['another_ways']}" ?></td></tr>i put this table in file and i pute it as inclode fie after searsh code Link to comment Share on other sites More sharing options...
masrawy Posted February 18, 2009 Author Share Posted February 18, 2009 sir i need it to print in this table<table border="0" width="100%" bordercolor="#FFFFFF" cellpadding="2" height="71"><tr><td width="26%" height="15" bgcolor=#efe8d6><b><span lang="ar-eg">اسم المستخدم</span></b></td><td width="85%" height="15" align="right" bgcolor="#efe8d6"><? echo " {$row['name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">تاريخ العضوية</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['date']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الإعلانات</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['countt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المتجر الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['m_name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المنتدى الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['ccoounttt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b>البريد الإليكتروني</b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['email']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الدولة</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['country']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المدينة</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['city']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الجوال</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['mobile1']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الهاتف</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['tel']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">طرق اتصال أخرى</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? $another_ways=nl2br($another_ways);?> <? echo "{$row['another_ways']}" ?></td></tr>i put this table in file and i pute it as inclode fie after searsh code Link to comment Share on other sites More sharing options...
masrawy Posted February 18, 2009 Author Share Posted February 18, 2009 sir i need it to print in this table<table border="0" width="100%" bordercolor="#FFFFFF" cellpadding="2" height="71"><tr><td width="26%" height="15" bgcolor=#efe8d6><b><span lang="ar-eg">اسم المستخدم</span></b></td><td width="85%" height="15" align="right" bgcolor="#efe8d6"><? echo " {$row['name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">تاريخ العضوية</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['date']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الإعلانات</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['countt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المتجر الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['m_name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المنتدى الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['ccoounttt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b>البريد الإليكتروني</b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['email']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الدولة</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['country']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المدينة</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['city']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الجوال</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['mobile1']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الهاتف</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['tel']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">طرق اتصال أخرى</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? $another_ways=nl2br($another_ways);?> <? echo "{$row['another_ways']}" ?></td></tr>i put this table in file and i pute it as inclode fie after searsh code Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2009 Share Posted February 18, 2009 Just replace the table in the loop with those rows. while ($row = mysql_fetch_assoc($result)) { ?><tr><td width="26%" height="15" bgcolor=#efe8d6><b><span lang="ar-eg">اسم المستخدم</span></b></td><td width="85%" height="15" align="right" bgcolor="#efe8d6"><? echo " {$row['name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">تاريخ العضوية</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['date']}" ?></td></tr>... <?php } Link to comment Share on other sites More sharing options...
masrawy Posted February 18, 2009 Author Share Posted February 18, 2009 and if i need the result cntain thsi counttccoountttwhat can i do ? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2009 Share Posted February 18, 2009 Just add another row in the table. If the $row variable from the database contains those fields then just change the name to print. Link to comment Share on other sites More sharing options...
masrawy Posted February 18, 2009 Author Share Posted February 18, 2009 i did sir see $row['ccoounttt']but all the fileds work but ther is 3 not work <tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">الإعلانات</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['countt']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المتجر الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo " {$row['m_name']}" ?></td></tr><tr><td width="26%" height="19" bgcolor=#efe8d6><b><span lang="ar-eg">المنتدى الإلكتروني</span></b></td><td width="85%" height="19" align="right" bgcolor="#efe8d6"><? echo "{$row['ccoounttt']}" ?></td></tr>i need tis thre works if i sersh for membersee whene i see an article for any user i can see this table under his artile i need also if i shearsh for member see also this table contain his information Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 All of the fields are coming from the same place in the database. If you don't see anything in the 'm_name' or 'countt' fields, then the database does not have any data in those fields. Link to comment Share on other sites More sharing options...
masrawy Posted February 19, 2009 Author Share Posted February 19, 2009 no sir i see it under att documents by any user the information like that in tablesee thatif ($action == "u_mtajer") {br(); echo "<center><font size=4 face=\"Traditional Arabic\"><b>المتجر الإلكتروني</b></font></center>";br(); br();if($memberid == ""){ echo "<p align=right><b><font size=2 color=#FF0000>عفواً.. لم تقم بالدخول للموقع، ولذلك لا يمكننا معرفة ما هو رابط متجرك الإلكتروني. يرجى <a href=index.php?action=inside><b><font size=2>الدخول للموقع </font></b></a> عن طريق اسم المستخدم وكلمة السر، أو كتابة رابط متجرك الإلكتروني في المتصفح مباشرة.</font></b></p>";br();}else {$selecct= mysql_query ("SELECT * from mtajer where mem_id='$memberid' and active='1'");$count= mysql_num_rows($selecct);if ($count == ""){ echo "<p align=right><b><font size=2 color=#FF0000>عفواً.. لم تقم بتصميم متجرك الإلكتروني. يمكنك تصميمه الآن عن طريق خطوات سهلة وواضحة في صفحة <a href=index.php?action=add_mtjer><b><font size=2>تصميم متجرك الإلكتروني </font></b></a> .</font></b></p>";}if ($count != ""){br(); $as2_select = mysql_query ("SELECT * from mtajer where mem_id='$mem_id' and active='1'"); while ($Row4=mysql_fetch_array($as2_select)) { $m_id = $Row4 [id]; $mem_id = $Row4 [mem_id]; $m_name = $Row4 [m_name]; $m_photo = $Row4 [m_photo]; $m_email = $Row4 ; $m_disc = $Row4 [m_disc]; $as7_select = mysql_query ("SELECT * from members where id='$mem_id' and active='1'"); while ($Row=mysql_fetch_array($as7_select)) { $id = $Row [id]; $mem_name = $Row [name]; $country = $Row [country]; $city = $Row [city]; $email = $Row ; $address = $Row [address]; $mobile = $Row [mobile1]; $tel = $Row [tel]; $another_ways = $Row [another_ways]; $date = $Row [date]; $special = $Row [special]; } $selecctm= mysql_query ("SELECT * from mtajer where mem_id='$mem_id' and active='1'"); $countm= mysql_num_rows($selecctm); $seleccts= mysql_query ("SELECT * from ssubject where mem_id='$mem_id' and active='1'"); $counts= mysql_num_rows($seleccts); $selecct= mysql_query ("SELECT * from forum_subjects where mem_id='$mem_id' and active='1'"); $countfs= mysql_num_rows($selecct); $selecctt= mysql_query ("SELECT * from forums where mem_id='$mem_id' and active='1'"); $countf= mysql_num_rows($selecctt); $selecctt= mysql_query ("SELECT * from subject_replays where subject_id='$m_id' and active='1'"); $countrep= mysql_num_rows($selecctt); $as2d_select = mysql_query ("SELECT * from ssubject where id='$m_id' and active='1'"); while ($Row9=mysql_fetch_array($as2d_select)) { $subjectid = $Row9 [id]; } $ascat_select = mysql_query ("SELECT * from cats where id='$cat_id' and active='1'"); while ($Row3=mysql_fetch_array($ascat_select)) { $catname = $Row3 [cat_name]; } $as17_select = mysql_query ("SELECT * from country where id='$sscountry'"); while ($Roww=mysql_fetch_array($as17_select)) { $scountry = $Roww [country]; }include ("template/style1/mtajer_disc.htm");br();echo "<table width=100% bgcolor=#1875B5><tr><td align=center> <b><font color=#FFFFFF>المعلن</font></b> </td></tr></table>";include ("template/style1/member_form_mtajer.tpl"); }br();}}}this is for the user mtjer i need like that when i searsh it print his mtjer and his subjects and his forumi hop you understand me Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 Well, I don't really understand. It would seem like I would almost need all of the code to figure out how your site works, and I don't really want to wade through that much code. I'm not sure what that code you posted is doing, and it doesn't really help that they use variable names like $as2_select and $as7_select and $Row4 and things that don't really mean anything to me. The code isn't written very well, and combine that with the fact that it uses Smarty, which I haven't used, it doesn't make it very easy to understand, especially considering the language barrier. I wish I could be more help, but I think we're having problems understanding each other. Link to comment Share on other sites More sharing options...
masrawy Posted February 19, 2009 Author Share Posted February 19, 2009 i'm i;m soory sir for that what i need now isif i searsh for user print him information ther is subject table and every user have his owen subjecti need if i searsh with your code to user searsh print also his own subject and mtjer and forum and so on i hop you understand me Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 No, I don't understand. I understand that you want to search for a user, that's fine. I don't know what a mtjer is, and I'm not sure how a user has subjects and forums, but I assume you have other database tables that have some other information you want to print also.The problem is how your site is set up. It sounds like there are a lot of files involved, and it's not very easy for me to tell you how to do something like this when you're working with the templates and includes and things like that, I just don't know how your site is put together. I showed you how to search for a user and print that stuff out in a table, but I can't say how to print subjects and forums, I just don't know the structure of the data you have.Basically, once you search for the user and have their ID, you should be able to look up whatever other information in the database using that ID. You print the other information the same way as I already showed you. First you get the results from the database and start your table, then you loop through each row and print it out.e.g.: // get the data$result = mysql_query('SELECT * FROM subjects WHERE user=' . $user_id);// start the tableecho '<table>';// print each rowwhile ($row = mysql_fetch_assoc($result)){ echo '<tr>'; echo '<td>' . $row['data'] . '</td>'; // use whatever names you want to print in the row echo '</tr>';}// end the tableecho '</table>'; Link to comment Share on other sites More sharing options...
masrawy Posted February 19, 2009 Author Share Posted February 19, 2009 I will explan with tablesi have 3 table now1-mtajerthe table is idmem_idm_namem_photoemailm_discactive2- forumsthe tables is idmem_idf_namef_bannerf_emailf_discbasic_colorborder_coloractive3-ssubjectidcat_idmem_idscountryoffer_requests_names_photos_discu see sirmem_id is the same table now what i ineed if i searsh for member and what is the way to get his information if i searsh for member how can i get his information frome mtjer like m_name or any other field i know i make you tired but really i teash all i know frome you thank you really sir Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 So you have code like this to do the search and print everything in the table: if ($search_user != ''){ $result = mysql_query ("SELECT * from members where name LIKE '%" . mysql_real_escape_string($search_user) . "%' and active='1'"); while ($row = mysql_fetch_assoc($result)) { // print the table }} I'm assuming that the members table also has a mem_id field. I'll give you an example with the mtjer table, it will work the same with the other 2 tables. There are a couple ways to do this, but a join might be too confusing to explain. This way should make more sense: if ($search_user != ''){ $result = mysql_query ("SELECT * from members where name LIKE '%" . mysql_real_escape_string($search_user) . "%' and active='1'"); while ($row = mysql_fetch_assoc($result)) { // print the table // get mtjer results $mem_id = $row['mem_id']; // if the members table does not have a "mem_id" field, change the name in the row $mtjer_result = mysql_query('SELECT * FROM mtjer WHERE mem_id=' . $mem_id); while ($mtjer_row = mysql_fetch_assoc($mtjer_result)) { echo $mtjer_row['m_name']; // print something from mtjer table } }} That's the basic idea. You can add more code where it prints out the mtjer results so that it prints in table rows or however else you want it to print, but that's the idea. You can copy and paste the mtjer code to use with the other 2 tables also. Link to comment Share on other sites More sharing options...
masrawy Posted February 19, 2009 Author Share Posted February 19, 2009 i'm soory for that this is the come if ($search_user != ''){ $result = mysql_query ("SELECT * from members where name LIKE '%" . mysql_real_escape_string($search_user) . "%' and active='1'"); while ($row = mysql_fetch_assoc($result)) { // print the table // get mtjer results $mem_id = $row['name']; // if the members table does not have a "mem_id" field, change the name in the row $mtjer_result = mysql_query('SELECT * FROM mtjer WHERE mem_id=' . $mem_id); while ($mtjer_row = mysql_fetch_assoc($mtjer_result)) { echo $mtjer_row['m_name']; // print something from mtjer table } include ("template/style1/member_s.tpl"); }}give me this errorWarning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\7raj\index.php on line 4522this is members tableidnamecountrycitydaymonthbirthemailemail_casemobile1telanother_wayspasswordfullnamevveducationdatespecialactiveactive_code Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 This should use the ID, not the name:$mem_id = $row['name'];$mem_id = $row['id']; Link to comment Share on other sites More sharing options...
masrawy Posted February 19, 2009 Author Share Posted February 19, 2009 can you plz write the complet code plz Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 Just change this line to use id:$mem_id = $row['name']; // if the members table does not have a "mem_id" field, change the name in the rowThat's the only thing that needs to be changed, change 'name' to 'id'. Link to comment Share on other sites More sharing options...
masrawy Posted February 19, 2009 Author Share Posted February 19, 2009 very good siri did but i need to print it as numbers likenumber of mtjer= 2if he have 2 mtjer i hope you understand me and sorry i make you tired Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2009 Share Posted February 19, 2009 If all you need is the number of records, you can replace this: $mem_id = $row['id']; // if the members table does not have a "mem_id" field, change the name in the row$mtjer_result = mysql_query('SELECT * FROM mtjer WHERE mem_id=' . $mem_id);while ($mtjer_row = mysql_fetch_assoc($mtjer_result)){ echo $mtjer_row['m_name']; // print something from mtjer table} with this: $mem_id = $row['id'];$mtjer_result = mysql_query('SELECT * FROM mtjer WHERE mem_id=' . $mem_id);$num_mtjer = mysql_num_rows($mtjer_result); or this: $mem_id = $row['id'];$mtjer_result = mysql_query('SELECT COUNT(*) AS num FROM mtjer WHERE mem_id=' . $mem_id);$num_row = mysql_fetch_assoc($mtjer_result);$num_mtjer = $num_row['num']; $num_mtjer will be the number of rows that the SQL statement returned. Link to comment Share on other sites More sharing options...
masrawy Posted February 20, 2009 Author Share Posted February 20, 2009 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\7raj\index.php on line 4521and what is will be the code echo to echo the results Link to comment Share on other sites More sharing options...
justsomeguy Posted February 20, 2009 Share Posted February 20, 2009 Change this:$mtjer_result = mysql_query('SELECT COUNT(*) AS num FROM mtjer WHERE mem_id=' . $mem_id);to this:$mtjer_result = mysql_query('SELECT COUNT(*) AS num FROM mtjer WHERE mem_id=' . $mem_id) or exit(mysql_error()); Link to comment Share on other sites More sharing options...
masrawy Posted February 20, 2009 Author Share Posted February 20, 2009 yes yes yes sir i didthank youanother help plzif i need the resulets as url i mean number of mtajer=2number 2 go to the user mtajer Link to comment Share on other sites More sharing options...
masrawy Posted February 20, 2009 Author Share Posted February 20, 2009 i need the reasults as linke Link to comment Share on other sites More sharing options...
masrawy Posted February 21, 2009 Author Share Posted February 21, 2009 thank you i did that another help plzther is two wayes if the user add advwant pay and celli put this code to print in index.phpthe last 5 want and the last 5 cellfun_block_open("345","100%","#e8d68e","#DD9900","<b><font size=2 color=#0000gg>".$Msg['hgi_lastsub']."</font></b>"); $as1_select = mysql_query ("SELECT * from ssubject where offer_request=1 order by id desc limit 0,5 "); while ($Row=mysql_fetch_array($as1_select)) { $ss_id = $Row [id]; $ss_name = $Row [s_name]; echo "<p style=\"padding-top: 2px;\">•<a href=\"index.php?action=advs&advid=$ss_id\"><font size=2><b>$ss_name </font></b></a></p>"; } fun_block_close();br(); //---------------------------------------------------------- اخر المعروضfun_block_open("345","100%","#e8d68e","#DD9900","<b><font size=2 color=#0000gg>".$Msg['hgi_lastsubb']."</font></b>"); $as1_select = mysql_query ("SELECT * from ssubject where offer_request=0 order by id desc limit 0,15 "); while ($Row=mysql_fetch_array($as1_select)) { $ss_id = $Row [id]; $ss_name = $Row [s_name]; echo "<p style=\"padding-top: 2px;\">•<a href=\"index.php?action=advs&advid=$ss_id\"><font size=2><b>$ss_name </font></b></a></p>"; } fun_block_close();br(); offer_request=pay or cellthe results fun_block_open("345","100%","#e8d68e","#DD9900","<b><font size=2 color=#0000gg>".$Msg['hgi_lastsub']."</font></b>"); $as1_select = mysql_query ("SELECT * from ssubject where offer_request=1 order by id desc limit 0,5 "); while ($Row=mysql_fetch_array($as1_select)) { $ss_id = $Row [id]; $ss_name = $Row [s_name]; echo "<p style=\"padding-top: 2px;\">•<a href=\"index.php?action=advs&advid=$ss_id\"><font size=2><b>$ss_name </font></b></a></p>"; } fun_block_close();br(); works good and print the last 5 but the code fun_block_open("345","100%","#e8d68e","#DD9900","<b><font size=2 color=#0000gg>".$Msg['hgi_lastsubb']."</font></b>"); $as1_select = mysql_query ("SELECT * from ssubject where offer_request=0 order by id desc limit 0,15 "); while ($Row=mysql_fetch_array($as1_select)) { $ss_id = $Row [id]; $ss_name = $Row [s_name]; echo "<p style=\"padding-top: 2px;\">•<a href=\"index.php?action=advs&advid=$ss_id\"><font size=2><b>$ss_name </font></b></a></p>"; } fun_block_close();br(); print onlly one resultswhere is the rong now i need to peint the last 5 adv from ssubject where offer_request=0and ssubject where offer_request=1 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.