Re: [PHP-DB] PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so'

2011-03-08 Thread nagendra prasad
Are you getting any error msg while installing it. Try to get a new copy of
php-mysql from internet and install it.



On Tue, Mar 8, 2011 at 4:17 PM, Scott Wen wen.xue...@gmail.com wrote:

 Hi,

 I installed mysql and php. Its OK.  After I install php-mysql, the
 following messages come out.

 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/mysql.so' - libmysqlclient.so.15: cannot open shared
 object file: No such file or directory in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/mysqli.so' - libmysqlclient.so.15: cannot open shared
 object file: No such file or directory in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/pdo_mysql.so' - libmysqlclient.so.15: cannot open
 shared object file: No such file or directory in Unknown on line 0


 The file of libmysqlclient.so.15 is located in /usr/lib/mysql and this
 folder is in ld.so.conf.
 But libmysqlclient.so.15 works fine in DBD::mysql and command line mysql
 (OS- fedora linux  8, mysql-5.0.45, php-5.2.6, php-mysql-5.2.6)


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Error while inserting data into mysql

2011-03-01 Thread nagendra prasad
Hi All,

I have 2 simple php pages. One with the form just like some sales voucher.
Another is to print in a proper format and to insert the form database into
mysql. When I enter some data in the sales voucher everything is going well,
however when it comes to the second php for inserting data into mysql I am
getting an error like Error: Unknown column 'scloth100_qty' in 'field
list'. I have checked everything but not sure about the error. Please help
me with it.

Best,
Guru.


[PHP-DB] Re: Error while inserting data into mysql

2011-03-01 Thread nagendra prasad
Hi All,

I have attached the table structure and the PHP code.

Best,
Guru.
===Database dream

== Table structure for table dream

|--
|Field|Type|Null|Default
|--
|mwool40|varchar(100)|Yes|NULL
|gwool25|varchar(100)|Yes|NULL
|wmesh24|varchar(100)|Yes|NULL
|shkote30|varchar(100)|Yes|NULL
|scloth100|varchar(100)|Yes|NULL
|macomp40|varchar(100)|Yes|NULL
|pop|varchar(100)|Yes|NULL
|hcloth95|varchar(100)|Yes|NULL
|mwool40_qty|int(10)|Yes|NULL
|gwool25_qty|int(10)|Yes|NULL
|wmesh24_qty|int(10)|Yes|NULL
|shkote30_qty|int(10)|Yes|NULL
|macomp40_qty|int(10)|Yes|NULL
|pop_qty|int(10)|Yes|NULL
|hcloth95_qty|int(10)|Yes|NULL
|mwool40_utp|int(20)|Yes|NULL
|gwool25_utp|int(20)|Yes|NULL
|wmesh24_utp|int(20)|Yes|NULL
|shkote30_utp|int(20)|Yes|NULL
|scloth100_utp|int(20)|Yes|NULL
|macomp40_utp|int(20)|Yes|NULL
|pop_utp|int(20)|Yes|NULL
|hcloth95_utp|int(20)|Yes|NULL
|mwool40_val|int(20)|Yes|NULL
|gwool25_val|int(20)|Yes|NULL
|wmesh24_val|int(20)|Yes|NULL
|shkote30_val|int(20)|Yes|NULL
|scloth100_val|int(20)|Yes|NULL
|macomp40_val|int(20)|Yes|NULL
|pop_val|int(20)|Yes|NULL
|hcloth95_val|int(20)|Yes|NULL
|mwool40_vatr|int(10)|Yes|NULL
|gwool25_vatr|int(10)|Yes|NULL
|wmesh24_varr|int(10)|Yes|NULL
|shkote30_vatr|int(10)|Yes|NULL
|scloth100_vatr|int(10)|Yes|NULL
|macomp40_vatr|int(10)|Yes|NULL
|pop_vatr|int(10)|Yes|NULL
|hcloth95_vatr|int(10)|Yes|NULL
|mwool40_vatp|int(20)|Yes|NULL
|gwool25_vatp|int(20)|Yes|NULL
|wmesh24_vatp|int(20)|Yes|NULL
|shkote30_vatp|int(20)|Yes|NULL
|scloth100_vatp|int(20)|Yes|NULL
|macomp40_vatp|int(20)|Yes|NULL
|pop_vatp|int(20)|Yes|NULL
|hcloth95_vatp|int(20)|Yes|NULL
|mwool40_totamt|int(20)|Yes|NULL
|gwool25_totamt|int(20)|Yes|NULL
|wmesh24_totamt|int(20)|Yes|NULL
|shkote30_totamt|int(20)|Yes|NULL
|scloth100_totamt|int(20)|Yes|NULL
|macomp40_totamt|int(20)|Yes|NULL
|pop_totamt|int(20)|Yes|NULL
|hcloth95_totamt|int(20)|Yes|NULL
|total|int(20)|Yes|NULL
|trans_chgs|int(15)|Yes|NULL
|gtotal|int(20)|Yes|NULL
|rupees|varchar(100)|Yes|NULL
|//**party_name**//|varchar(400)|No|
|tin_no|varchar(50)|Yes|NULL
|invoice_no|varchar(50)|Yes|NULL
|invoice_date|varchar(20)|Yes|NULL
|order_no|varchar(15)|Yes|NULL
|order_date|varchar(20)|Yes|NULL
|dc_no|varchar(20)|Yes|NULL
|dc_date|varchar(15)|Yes|NULL
== Dumping data for table dream

?php
$con = mysql_connect(localhost,root,);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db(dream, $con);

$sql=INSERT INTO dream (mwool40, gwool25, wmesh24, shkote30, scloth100, 
macomp40, pop, hcloth95, mwool40_qty, gwool25_qty, wmesh24_qty, shkote30_qty, 
scloth100_qty, macomp40_qty, pop_qty, hcloth95_qty, mwool40_utp, gwool25_utp, 
wmesh24_utp, shkote30_utp, scloth100_utp, macomp40_utp, pop_utp, hcloth95_utp, 
mwool40_val, gwool25_val, wmesh24_val, shkote30_val, scloth100_val, 
macomp40_val, pop_val, hcloth95_val, mwool40_vatr, gwool25_vatr, wmesh24_vatr, 
shkote30_vatr, scloth100_vatr, macomp40_vatr, pop_vatr, hcloth95_vatr, 
mwool40_vatp, gwool25_vatp, wmesh24_vatp, shkote30_vatp, scloth100_vatp, 
macomp40_vatp, pop_vatp, hcloth95_vatp, mwool40_totamt, gwool25_totamt, 
wmesh24_totamt, shkote30_totamt, scloth100_totamt, macomp40_totamt, pop_totamt, 
hcloth95_totamt, total, trans_chgs, gtotal, rupees, party_name, tin_no, 
invoice_no, invoice_date, order_no, order_date, dc_no, dc_date)
VALUES
('$_POST[mwool40]','$_POST[gwool25]','$_POST[wmesh24]','$_POST[shkote30]','$_POST[scloth100]','$_POST[macomp40]','$_POST[pop]','$_POST[hcloth95]','$_POST[mwool40_qty]','$_POST[gwool25_qty]','$_POST[wmesh24_qty]','$_POST[shkote30_qty]','$_POST[scloth100_qty]','$_POST[macomp40_qty]','$_POST[pop_qty]','$_POST[hcloth95_qty]','$_POST[mwool40_utp]','$_POST[gwool25_utp]','$_POST[wmesh24_utp]','$_POST[shkote30_utp]','$_POST[scloth100_utp]','$_POST[macomp40_utp]','$_POST[pop_utp]','$_POST[hcloth95_utp]','$_POST[mwool40_val]','$_POST[gwool25_val]','$_POST[wmesh24_val]','$_POST[shkote30_val]','$_POST[scloth100_val]','$_POST[macomp40_val]','$_POST[pop_val]','$_POST[hcloth95_val]','$_POST[mwool40_vatr]','$_POST[gwool25_vatr]','$_POST[wmesh24_vatr]','$_POST[shkote30_vatr]','$_POST[scloth100_vatr]','$_POST[macomp40_vatr]','$_POST[pop_vatr]','$_POST[hcloth95_vatr]','$_POST[mwool40_vatp]','$_POST[gwool25_vatp]','$_POST[wmesh24_vatp]','$_POST[shkote30_vatp]','$_POST[scloth100_vatp]','$_POST[macomp40_vatp]','$_POST[pop_vatp]','$_POST[hcloth95_vatp]','$_POST[mwool40_totamt]','$_POST[gwool25_totamt]','$_POST[wmesh24_totamt]','$_POST[shkote30_totamt]','$_POST[scloth100_totamt]','$_POST[macomp40_totamt]','$_POST[pop_totamt]','$_POST[hcloth95_totamt]','$_POST[total]','$_POST[trans_chgs]','$_POST[gtotal]','$_POST[rupees]','$_POST[party_name]','$_POST[tin_no]','$_POST[invoice_no]','$_POST[invoice_date]','$_POST[order_no]','$_POST[order_date]','$_POST[dc_no]','$_POST[dc_date]');

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo 1 record added;

mysql_close($con)
? -- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: 

Re: [PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread nagendra prasad
Thanks Geoff Lane, I saw my mistake. Their was no scloth100_qty in my mysql
table. Once again Thanks buddy :)


On Tue, Mar 1, 2011 at 4:53 PM, Geoff Lane ge...@gjctech.co.uk wrote:

 On Tuesday, March 1, 2011, Richard Quadling wrote;

  Can you tell me what column in the table is scloth100_qty? I can't find
 it.

 The issue here is probably that you have some PHP code that is passing
 a SELECT statement to MySQL and that SELECT includes scloth100_qty in
 its column list. One debugging technique that I find useful in such
 situations is to echo the query to the output web page. So, if your
 original code was:

  $result_table = mysql_query ($query, $link);

 Then you might try inserting the line:

  echo p$query/p;

 immediately before the call to mysql_query, i.e.:

  echo p$query/p;
  $result_table = mysql_query ($query, $link);

 You can then examine the actual query being passed to MySQL and work
 backwards from there to correct the issue.

 HTH,

 --
 Geoff


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Need help with an extra backslash

2011-03-01 Thread nagendra prasad
Hi All,

I have a list of product in which WIRE MESH 24G X 3/4 is one of them. When
I am trying to print the same its coming like WIRE MESH 24G X 3/4\. I want
to remove the extra \ backslash from the result page. Please help me with
this.

Best,
Guru.


[PHP-DB] Select the specific user data from the database

2010-09-05 Thread nagendra prasad
Hi Experts,

I have a mysql database. What I want is that when a user login he can able
to see his entries only, so that he can delete, add or edit his entries
only. I have 2 different tables one for user details and another for actual
entries. Please help me.

Best,
Guru.


[PHP-DB] Is this syntax is correct?

2010-09-05 Thread nagendra prasad
Hi All,

Is this syntax is correct??

SELECT username FROM data, password FROM registration WHERE username=%s AND
password=%s


Best,
Guru.


Re: [PHP-DB] Select the specific user data from the database

2010-09-05 Thread nagendra prasad
PS: Want to check the username from a table and the password from another
table.

Is it possible ??


[PHP-DB] Re: Need Help with database output

2010-08-30 Thread nagendra prasad
Hi All,

Thanks for all your replies. I have found what I needed. I used Dreamweaver
to show the database in 3 different columns. However now I don't know how to
add a search engine to it. Right now its showing all the records in my
database in 3 columns. Now I want to put a search engine code so that user
can search data whatever he wants. I see the difference in normal php codes
and Dreamweaver php codes. Please suggest me how to add a search engine
script to the existing 3 column script.

Best,
Guru.


Re: [PHP-DB] Re: Need Help with database output

2010-08-30 Thread nagendra prasad
yep if you want to make a slight changes like some color or some space
change you can always use the code tab in the Dreamweaver :). I fee very
easy to change minor codes in the coding tab rather then using menus and
stuff :)


[PHP-DB] Need Help with database output

2010-08-28 Thread nagendra prasad
Hi All,

I have a database and I want to show it in 3 columns Like

Col1   Col2 Col3
data1   data2   data3
data4   data5   data5
   ...


I tired using table but its not working. Please help me.

Best,
guru.


[PHP-DB] Unable to connect to mysql database

2010-08-10 Thread nagendra prasad
Hi All,

I am working on a site which is developed in joomala. We have our domain on
www.net4.in. Initially we have tested the site on the WAMP server locally.
On the wamp server its working fine, however when we tried to configure it
on www.net4.in its not working at all. The site is giving an error called
unable to connect to database. I have already configured the config file.
Can anyone tell me how to connect the script with the database? Dose anyone
have any experience working on www.net4.in control panel?

Best,
Guru.


[PHP-DB] Need help with HTML form errors

2010-07-04 Thread nagendra prasad
Hi All,

I have this php form that I have inserted in the result page.


form action=index.php method=post
table class=bd border=0 cellspacing=1 cellpadding=4
tr
tdb/bnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/td
tdinput type=text name=filter value=?php echo $filter ?/td
tdinput type=submit name=action value=Search/td

tdselect name=filter_field style=width:100px;
option value=All Fields/option
option value=?php echo Type ??php if ($filterfield == type) { echo
selected; } ??php echo htmlspecialchars(Type) ?/option
option value=?php echo Name ??php if ($filterfield == name) { echo
selected; } ??php echo htmlspecialchars(Name) ?/option
option value=?php echo Date ??php if ($filterfield == date) { echo
selected; } ??php echo htmlspecialchars(Date) ?/option
option value=?php echo Size ??php if ($filterfield == size) { echo
selected; } ??php echo htmlspecialchars(Size) ?/option

/select/td

/tr


/table

hr size=1 noshade

***

The above code is giving me the following errors:

br / bNotice/b:  Undefined variable: filter in
bC:\wamp\www\5_Final\index.php/b on line b228/bbr /

Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on
line 233  Type
Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on
line 234  Name
Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on
line 235  Date
Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on
line 236  Size



*Please help me with these errors.*


[PHP-DB] Image linking help in PHP

2010-07-04 Thread nagendra prasad
Hi All,

I have a database of MP3 and I want to link the download tab with an image
so that when user clicks on the image the download should start. I have full
path of MP3 in my database, I just want to link the same image with every
song. I don't want to upload the image to mysql database. I hope I am clear
with my issue. Please do let me know if I am not clear.

Best,
Guru.


Re: [PHP-DB] Image linking help in PHP

2010-07-04 Thread nagendra prasad
Thanks Jason, However will this work if each time let say a variable called
$mp_url will change. I hope you know what I meant. The MP3 link will not be
constant, but the image file link could be constant.

I already linked the MP3 link with its own name (Text ) and its working but
now I want to replace the MP3 name (Text)  with an image because the song
name will be the heading of the page so no need to echo out twice right.

Best,
Guru.


[PHP-DB] Need Help in Mysql database

2010-06-30 Thread nagendra prasad
Hi All,

I have a huge set of MP3 database. My problem is that when I try to search
in my database its getting very slow. I was wondering if I split that
database into 2 or more tables. Will this improve the speed of searching? Is
it the best solution for my problem or is their any other solution?

Best,
Guru.


[PHP-DB] Re: Need Help in setting up a server

2010-06-29 Thread nagendra prasad
Hi all,

Thanks everyone. I just tried all of your suggestions and found that WAMP
server is working by using the running WAMP server's system IP. I just typed
192.168.1.4 in the address bar and its working now. So, I came to a
conclusion that if I have a static IP then I can access it from out side as
well right. Correct me if I am wrong ?? So, if I am right is it possible to
run a server from home ??


Best,
Guru.


[PHP-DB] Need Help in setting up a server

2010-06-27 Thread nagendra prasad
Hi All,

I need help in setting up a home server. I know the subject line looks like
an off topic but trust me its not. What I want is to set up a WAMP server
over the intranet. I have a laptop and 2 desktop. I want to set up a desktop
like a wamp server locally so that I can able to use or able to work from my
other systems as well locally. I hope  I made my point clear. If not please
do let me know.

Best,
Guru.


[PHP-DB] Help needed in searching a sentence in the code

2010-05-26 Thread nagendra prasad
Hi All,

I have this code where user can search a song or the entire song title. It
looks like when a user search a single word its searching and giving the
proper results. However if the user wants to search the entire sentence its
not giving the proper results. For example let say I have searched for the
MJ's song Earth Song, its giving me the proper results. However if I am
searching for the MJ's  Why You Wanna Trip On Me, its not giving me the
proper results. Below is the code:



?php


//get data
$button = $_GET['submit'];
$search = $_GET['search'];

$s = 0;
$s = $_GET['s'];
if (!$s)
$s = 0;
$i = 0;

$e = 30; // Just change to how many results you want per page


$next = $s + $e;
$prev = $s - $e;




 if (strlen($search)=2)


  echo brtable align='center'trtdsupdagger;/supfont
face='sana-serif' size='6'font color='blue'bsupa href='
http://localhost/searchengine/' style='text-decoration:
none'MP3dom/a/sup/b/b/fontfont face='sana-serif'
size='3'suptrade;/sup/tdtdsupform action='search.php'
method='GET'input type='text' onclick=value='' size='50' name='search'
value='$search' input type='submit' name='submit'
value='Search'/form/td/tr/table table bgcolor='#FF'
width='100%' height='1px'br //tabletable bgcolor='#f0f7f9'
width='100%' height='10px'trtddiv align='right'bMust be greater
then 3 chars/b/div/td/tr/tablep/sup;
 else
 {
  echo brtable align='center'trtddagger;font face='sana-serif'
size='6'font color='blue'ba href='http://localhost/searchengine/'
style='text-decoration: none'MP3dom/a/b/b/fontfont
face='sana-serif' size='3'suptrade;/sup/tdtdsubform
action='search.php' method='GET'input type='text' onclick=value=''
size='50' name='search' value='$search'input type='submit' name='submit'
value='Search'/form/td/tr/table/sub;

  //connect to database
  mysql_connect(localhost,root,);
  mysql_select_db(mp3);



   //explode out search term
   $search_exploded = explode( ,$search);

   foreach($search_exploded as $search_each)
   {

//construct query
$x++;
if ($x==1)
 $construct .= name LIKE '%$search_each%';
else
 $construct .=  OR name LIKE '%$search_each%';

   }

  //echo outconstruct
  $constructx = SELECT * FROM data WHERE $construct;

  $construct = SELECT * FROM data WHERE $construct LIMIT $s,$e ;
  $run = mysql_query($constructx);

  $foundnum = mysql_num_rows($run);


  $run_two = mysql_query($construct);

  if ($foundnum==0)
   echo table bgcolor='#F1EDC2' width='100%' height='1px'br
//tabletable bgcolor='#f0f7f9' width='100%' height='10px'trtddiv
align='right'No results found for
b$search/b/div/td/tr/tablep;
  else
  {
   echo table bgcolor='#F1EDC2' width='100%' height='1px'br
//tabletable bgcolor='#f0f7f9' width='100%' height='10px'trtddiv
align='right'Showing 1-30 of b$foundnum/b results found for
b$search./b/div/td/tr/tablep;







   print 'table bgcolor=#F1EDC2 width=700  height=30 border=0
align=center ';
   print 'tr';

 print 'td width=100 nowrap=nowrapstrongArtist/strong/td';
 print 'td width=250 nowrap=nowrapstrongSong
Name/strong/td';
 print 'td width=50 nowrap=nowrapstrongMovie
Date/strong/td';
 print 'td width=50 nowrap=nowrapstrongSize/strong/td';

   print '/tr';
   while ($runrows = mysql_fetch_assoc($run_two))
   {
//get data
   $type = $runrows['artist'];
   $date = $runrows['date'];
   $name = $runrows['name'];
   $size = $runrows['size'];



 foreach ($runrows as $row)
{
  if ($i % 2 != 0) # An odd row
$rowColor = #EBECE4;
  else # An even row
$rowColor = #FEF1E9;



 print 'table width=700 height=30 border=0 align=center';

}


   print '?php do { ?';
 print 'tr bgcolor=' . $rowColor . '';

   print 'td nowrap=nowrap width=100'.'font color=:blue
size=2'.$type.'/td';
   //print 'td nowrap=nowrap width=250'.'font size=2'.a
herf='$url'$name.'/td';

   print 'td nowrap=nowrap width=250'.'font color=blue
size=2'.a href='download.php?url=$url'$name.'/font/td';


   print 'td nowrap=nowrap width=100 align=center'.'font
size=2'.$date .'/td';
   print 'td nowrap=nowrap width=50'.'font size=2'.$size
.'/td';
   print 'td nowrap=nowrap width=25'.'font size=2'.$se
.'/td';
   print 'td nowrap=nowrap width=25'.'font size=2'.$le
.'/td';
 print '/tr';



 print '/table';
 print '/body';
 print '/html';

   }
?


table width='100%'
tr
td
div align=center
brbr
?php
if (!$s=0)
 echo a href='search.php?search=$searchs=$prev'Prev/a;

$i =1;
for ($x=0;$x$foundnum;$x=$x+$e)
{


 echo  a href='search.php?search=$searchs=$x'$i/a ;


$i++;


}

if ($s$foundnum-$e)
  echo a href='search.php?search=$searchs=$next'Next/a;

}
}


?
/div
/td
/tr
/table


***

Also, the above code is giving me the below errors:

*Notice*: Undefined index: s in *C:\wamp\www\searchengine\search.php* on
line *11
**Notice*: Undefined variable: x in *C:\wamp\www\searchengine\search.php* on
line *46*

*Notice*: Undefined variable: 

Re: [PHP-DB] Need Simple PHP mysql search engine script

2010-05-24 Thread nagendra prasad
Hi Chaitanya,

I have used the below script but its not meeting my requirements. What I
need is that I have a database in which their are names which I wanted to
use as keywords. I want to  search with only one variable called Names. the
other stuff will come along with it. Please help me if anyone knows a good
script for it.

PS: I have tried my own script and a number of scripts available on the net
but it didn't worked as per my requirements.

Best,
Guru.


[PHP-DB] Need Simple PHP mysql search engine script

2010-05-23 Thread nagendra prasad
Hi All,

I need a simple PHP mysql search engine script. I know their are lots of
scripts available on the net, but I need a script which is tested by you or
any experts. Please help me.

Best,
Guru.


[PHP-DB] Need Help in error msg

2010-05-18 Thread nagendra prasad
Hi All,

I am getting this error while tried to run a downloaded script in WAMP:

[1045] dbconn: mysql_connect: Access denied for user 'root'@'localhost'
(using password: YES)

Dose anyone know what exactly this means.

Best,
Guru.


[PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread nagendra prasad
Hi All,

I have a database of MP3's in mysql. The database contains MP3 name, artist,
date, size etc. I need to order the search results in both ascending and
descending order. For example if user wants to see the size of all mp3's in
ASC order he will click on size column and again if he wants to see the
MP3's in DEC order he can click on the size column. Suppose the MP3's are
arranged in ASC order and if he clicks on size column the data should
arrange in DEC order.

Any idea how I should go about it ?

Please help me :)

Best,
Guru.


Re: [PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread nagendra prasad
DB is like more then 500MB

and it will grow day by day :)



On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont ejsmont.ar...@gmail.comwrote:

 If the DB is very small use tablesorter plugin of jquery. Otherwise
 custumizable query method.

 On 17 May 2010 07:56, nagendra prasad nagendra802...@gmail.com wrote:

 Hi All,

 I have a database of MP3's in mysql. The database contains MP3 name,
 artist,
 date, size etc. I need to order the search results in both ascending and
 descending order. For example if user wants to see the size of all mp3's in
 ASC order he will click on size column and again if he wants to see the
 MP3's in DEC order he can click on the size column. Suppose the MP3's are
 arranged in ASC order and if he clicks on size column the data should
 arrange in DEC order.

 Any idea how I should go about it ?

 Please help me :)

 Best,
 Guru.




Re: [PHP-DB] Help with mysql data sorting using php

2010-05-17 Thread nagendra prasad
Hi Artur,

I am a beginner to this stuff. So, If you or anyone can give me some example
codes or may be some links for my reference that would be a great help.

Best,
Guru.

On Mon, May 17, 2010 at 12:57 PM, Artur Ejsmont ejsmont.ar...@gmail.comwrote:

 Hehe. Then a method: ) just make a query builder method like 'findSongs'
 with all the params ( optional or mandatory ) like page, limit, sortby,
 filters etc. then inside build SQL based on args.  Just be careful - SQL
 injection is your enemy here. From app pass all the args from get/ post and
 that's it. Good luck.

 On 17 May 2010 08:18, nagendra prasad nagendra802...@gmail.com wrote:

 DB is like more then 500MB

 and it will grow day by day :)





 On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont ejsmont.ar...@gmail.com
 wrote:
 
  If the DB i...




Re: [PHP-DB] How to use PHP to fill in existing pdf document

2010-05-01 Thread nagendra prasad
I am not sure if this works for your project but you can first ask user to
fill the form in PHP and then convert it into PDF. What say?


Re: [PHP-DB] Online PHP-Mysql Meeting

2010-04-14 Thread nagendra prasad
Sorry guys, from past 10 days my net connection was not working and now I
have my project deadline. I guess we will have to do this meeting sometime
later.

I am sorry again :)

Best,
Guru.


[PHP-DB] Re: Online PHP-Mysql Meeting

2010-03-18 Thread nagendra prasad
Hi All,

As we are discussing about how to roll out this meeting from past 3-4
days Taygun
ALBAN has raised an important point about the meeting (Thanks Taygun for
pointing out this). As we all know we don't live in the same country, so
their will be some difference between each one's time zone. Taygun has
pointed out that we all are from different time zone so how we are going to
roll out this meeting? Guys please pitch in and think about this issue. We
will have to come with some solution so that all of us can attend this
meeting.

Also, I think now its time to decide a date for the meeting. Please suggest
a date as well.


Best,

Guru.


Re: [PHP-DB] Online PHP-Mysql Meeting

2010-03-18 Thread nagendra prasad
This is vary nice Gunawan :) I will post my example movie tonight and see if
this works. I am going to make a live working movie which will show the user
as if he is sitting just next to me. I will also try to put some subtitles
in it. Just thinking if anyone know a tool which can convert MP3 to text so
that I can record the audio in MP3 and then I can get the whole audio into
text. This would be easier for everyone while making an audio-video movie
with subtitles.

Just for making everyone's life easier here are few tool which we can use it
while making movie clips:

1. Any screen capturing tool (Snagit will do)
2. Any Movie editing tool (Generally Window movie maker but I recommend
Ulead Video studio)

3. Any video compressor tool which will reduse the size of the movie so that
it would be easier to upload it. ( su...@2000 will do)



Best,
Guru.


Re: [PHP-DB] Online PHP-Mysql Meeting

2010-03-17 Thread nagendra prasad
Hi All,

Here are few topics which covers basic PHP-MYSQL which I think is useful for
the meeting:

1. Introduction to PHP-MYSQL
2. PHP page basic structure
3. MYSQL connectivity using PHP
4. User login tips and tricks
5. User registration and its structure
6. Search engine using PHP-MYSQL
7. Sessions
8. File manipulation  handling
9. Mail function
10. Security issues

I have added the above topics in the Online Meeting Google Doc Sheet in
Sheet2.

Please feel free to add few more points if you think its important for this
meeting.

Best,
Guru.


Re: [PHP-DB] Online PHP-Mysql Meeting

2010-03-17 Thread nagendra prasad
I think we should either consider audio or video because not everyone has a
high speed broadband connection. What my plan is that each one who is
teaching some topic can create a video on the topic. He can use any screen
capturing tool with audio and share that vedio with all of us. Then I will
create a yahoo chat room for this meeting so that people can come to that
room after watching videos and can ask questions about it. What say ppl??

PS: I don't know if yahoo is still allowing  private rooms !


Re: [PHP-DB] Online PHP-Mysql Meeting

2010-03-15 Thread nagendra prasad
Hi David,

I am glad that you are in. However don't worry about the presentation stuff.
If you Google Online free presentation, you will find your answer. So, Guys
lets start making some plan. I have created a Google spreadsheet. Please put
your Ideas and topics about the meeting.

Here is the link:

http://spreadsheets.google.com/ccc?key=0AvOd4XuevVJndEx0dEJxZklBcEpYdi1HcFZrT0tTcEEhl=en

Please feel free to add few more columns if needed.


[PHP-DB] Re: Online PHP-Mysql Meeting

2010-03-15 Thread nagendra prasad
Hi All,

I am really happy that these many people are interested in online meeting. I
had thought about 2 ways to how to roll out this meeting.

1. First the person who is teaching a topic can make a presentation with
audio or he can directly make a video of his topic and share it with others.
After watching the presentation/video we can have a FAQ meeting about each
and every topic. We can create a group in yahoo messenger and let ppl come
their and ask questions about each topic.

OR


2. We can fix a time and use some online presentation tool available on the
net for free to roll out this meeting.
http://www.google.com/#hl=ensource=hpq=free+online+presentation+toolaq=faqi=aql=oq=fp=22b4dcbb1403dc0f

If someone has any other idea please reply to this mail.

Best,
Guru


[PHP-DB] Online PHP-Mysql Meeting

2010-03-14 Thread nagendra prasad
Hi All,

Few days back I have attended Ubuntu User day meeting. In that we had few
important topics about Ubuntu and few people volunteered  the class and
taught about Ubuntu like Installing Ubuntu, Command line and stuff like
that. I was wondering if we could have the same thing for PHP. We can set
few important topics and if someone is expert on that topic he/she can teach
that topic in the meeting just like a classroom. What say ppl? This could be
the best place for a beginner to learn about PHP stuff :)

Let me know your thoughts about it?

Best,
Guru.


[PHP-DB] Need a tool for mysql file

2010-02-25 Thread nagendra prasad
Hi All,

I have a mysql database file of around 1 GB in size. Is their any tool which
which I can see all the database without uploading it on phpmyadmin on
localhost. I have tried to upload it on localhost but it said the file size
is too large  (I have changed the ini file as well but no luck ). I need a
tool with which I can see all the tables and the data in the file.

Best,


-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


[PHP-DB] Is this Code Correct??

2010-02-11 Thread nagendra prasad
Hi All,

I want to link the actual file when the result is displayed.

url = actual MP3 location
Name = Name of the MP3

Here is the code that I want to link with:

echo  Name: .a herf='$url'.$runrows['name'];

Is above code is correct ??

Best,


-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


Re: [PHP-DB] Is this Code Correct??

2010-02-11 Thread nagendra prasad
Thanks Buddy, its working but the linking is not working properly. Its
taking me the same page address on which right now I am.

http://localhost/searchengine/download.php?url=mj_bad_track01.mp3

I want to connect the url directly to the MP3 file so that user can download
the MP3.

Best,


Re: [PHP-DB] Is this Code Correct??

2010-02-11 Thread nagendra prasad
Yep now its working :)

Thanks,

Guru.


[PHP-DB] Need help with linking

2010-02-03 Thread nagendra prasad
Hi All,

I have created a search engine for MP3 with mysql database. Now I want to
connect each search result with its respective info page which will consist
with name of the artist, size, year, and so on. Dose anyone knows how to do
it? I did created few static pages with all these info. But its impossible
to create for thousands of MP3s. Please help me.

Best,


-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


[PHP-DB] Need Help with data sorting

2010-01-31 Thread nagendra prasad
Hi,

I have a database of MP3s in mysql and I have created a php search engine.
Now I want to sort it in ascending or descending order if user clicks on the
title of the table. For example if user want to arrange the table in
ascending or descending order by Name, Size, or by any other field. Also, I
am unable to arrange the table properly. Please help me?? Below is the
code.

Type = Rock, Pop etc.
Url = file url
Name= Name of the song
Size = size



?php


//get data
$button = $_GET['submit'];
$search = $_GET['search'];


$s = $_GET['s'];
if (!$s)
$s = 0;


$e = 30; // Just change to how many results you want per page


$next = $s + $e;
$prev = $s - $e;




 if (strlen($search)=2)
  echo Must be greater then 3 chars;
 else
 {
  echo br /tabletrtdfont face='sana-serif' size='10'font
color='blue' bMymp3/b/bfont face='sana-serif'
size='3'reg;/tdtdform action='search.php' method='GET'input
type='text' onclick=value='' size='50' name='search' value='$search' input
type='submit' name='submit' value='Search'/form/td/tr/table;

  //connect to database
  mysql_connect(localhost,root,);
  mysql_select_db(mp3);

   //explode out search term
   $search_exploded = explode( ,$search);

   foreach($search_exploded as $search_each)
   {

//construct query
$x++;
if ($x==1)
 $construct .= name LIKE '%$search_each%';
else
 $construct .=  OR name LIKE '%$search_each%';

   }

  //echo outconstruct
  $constructx = SELECT * FROM mp3 WHERE $construct;

  $construct = SELECT * FROM mp3 WHERE $construct ORDER BY se DESC LIMIT
$s,$e ;
  $run = mysql_query($constructx);

  $foundnum = mysql_num_rows($run);


  $run_two = mysql_query($construct);

  if ($foundnum==0)
   echo No results found for b$search/b;
  else
  {
   echo table bgcolor='#FF' width='100%' height='1px'br
//tabletable bgcolor='#f0f7f9' width='100%' height='10px'trtddiv
align='right'Showing 1-20 of b$foundnum/b results found for
b$search./b/div/td/tr/tablep;

   echo table bgcolor='#FF' width='100%' height='1px'br
//tabletable bgcolor='#f0f7f9' width='100%' height='10px'trtdfont
face='sana-serif' size='3'
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Type
bnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
Name/b
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;  Size
/div/td/tr/tablep;

   while ($runrows = mysql_fetch_assoc($run_two))
   {
//get data
   $type = $runrows['type'];
   $date = $runrows['date'];
   $url = $runrows['url'];
   $name = $runrows['name'];
   $size = $runrows['size'];


   print 'table width=800 border=0 align=center ';

   print 'tdfont color=blue'.$type.'/font/td';


//print 'tdfont color=blue'.http://localhost/mymp3/.;a
herf='$url'$name.'/font/td';


print 'tdfont color=blue'.a href='$url'$name.'/font/td';


print 'tdfont color=blue'.$size.'/font/td';



  print '/tr';

  print '/tr';
print '/table';

  /* echo table width='300px' height='10px'
   h4 font color='blue'$type --   $name/fontbbrSize: $size
/b/abr /
  font color='00CC00'Date Added: $date/font/table/h4
   ;   */
   }
?

table width='100%'
tr
td
div align=center
brbr
?php
if (!$s=0)
 echo a href='search.php?search=$searchs=$prev'Prev/a;

$i =1;
for ($x=0;$x$foundnum;$x=$x+$e)
{


 echo  a href='search.php?search=$searchs=$x'$i/a ;


$i++;


}

if ($s$foundnum-$e)
  echo a href='search.php?search=$searchs=$next'Next/a;

}
}


?
/div
/td
/tr
/table

-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


[PHP-DB] Need Help

2010-01-28 Thread nagendra prasad
Hi,

I have a database of MP3 and I have designed a PHP-Mysql search engine. I
want to break it down in pages like Google dose. What I mean is when I
search for a song it will show me some 100 song list but I want 20 songs per
page. So, is their any trick to do it?

Best,


-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


[PHP-DB] Need help with the code

2009-10-02 Thread nagendra prasad
Hi All,

I need some help with the below code. I have this login code with me and its
working fine with my *localhost 'WAMP' *server. But when I tried to run the
same script on my web host server its not working. Every time its giving me
the same message *please enter a username and a password* which is a
condition within the script.


?php
session_start();

$username = $_POST['username'];
$password = $_POST['password'];

 if ($username$password)

 {
$connect = mysql_connect(localhost, tutor_root, admin) or
die(couldn't connect);
mysql_select_db(tutor_register) or die(couldn't find db);


$query = mysql_query(SELECT * FROM register WHERE username ='$username');
$numrows = mysql_num_rows($query);
if ($numrows!=1)

{
//code to login

while ($row =mysql_fetch_assoc($query))
{
  $dbusername = $row['username'];
  $dbpassword=  $row['password'];

}
 //check to see if they match

 if ($username==$dbusername$password==$dbpassword)
 {
echo you are in a href='member.php'click/a here to enter the members
page;


$_SESSION['username']=$username;

 }
 else

 echo incorrect password;
}
else

die(That user dosen't exist);


}
  else
  die(pelase enter a username and a password);



?

-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


Re: [PHP-DB] Need help with the code

2009-10-02 Thread nagendra prasad
OK so here is the form for the below code:

html

  form action='mem_login.php' method='POST'
Username: input type='text' name='username'br
Password: input type='password' name='password'br
input type='submit' value='Log in'


  /form
/html


Re: [PHP-DB] Need help with the code

2009-10-02 Thread nagendra prasad
Yes I did but still its not working on my web server however its working
fine with my WAMP server locally.



On Fri, Oct 2, 2009 at 9:17 PM, Jason Gerfen jason.ger...@scl.utah.eduwrote:

 nagendra prasad wrote:

 OK so here is the form for the below code:

 html

  form action='mem_login.php' method='POST'
Username: input type='text' name='username'br
Password: input type='password' name='password'br
input type='submit' value='Log in'
  /form
 /html

  Did you try looking at the $_POST array data?

 echo var_dump(print_r($_POST));


 --
 Jason Gerfen
 Systems Administration/Web application development
 jason.ger...@scl.utah.edu

 Marriott Library
 Lab Systems PC
 295 South 1500 East
 Salt Lake City, Utah 84112-0806
 Ext 5-9810




-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


Re: [PHP-DB] Need help in PHP file Management System

2009-09-23 Thread nagendra prasad
Hi Vinay, Eric  Everyone,

Sorry, I was down with fever 'malaria' since last Friday. I was hospitalized
for 3 days. It will take more 2-3 days for me to start working again on my
project. Anyways till now I didn't get anything which will solve my issue.
Lets see if anyone comes with something new.

Best,


[PHP-DB] Re: Need PHP developers in Hyderabad

2009-09-17 Thread nagendra prasad
Hi All,

I am sorry to confuse you all. This is not a job! Anyone who is or want to
work with me as a partners are invited. But here let me clear a point that I
am not asking or going to ask any money like any other mails you get time to
time. Anyone who wants to take technical challenges and work with me on my
project are most welcome. If you still didn't get my point then let me give
an example, I want to start a business with more people just like Lary 
Sergay started their own business like 'Google'. I hope I made my point
clear. OK the example is giving you a kind of high expectations but this is
the only example right now in my mind. Pardon me if I was a little rude in
my mail. I didn't intend to hurt anyone and I never do that. Below are the
criteria which I would like to see in my partner:

1. Person should know PHP-MYSQL (OK this is a basics requirement)

2. Person should know how to work with technical issues even if you have no
idea about it.

3. Person should able to think about big picture or person can able to think
out of the box.

4. Last but not the least I would prefer if you live in *Hyderabad*.

*You can mail back me for any other queries or call me at: 9949817253.*


Best,


[PHP-DB] Need help in PHP file Management System

2009-09-17 Thread nagendra prasad
Hi All,

I need help in PHP file management system. So, I am working on my project in
which user will upload a file on the server. I know how to upload a file on
server using PHP. But the problem is how to differentiate the different
uploaded files with different users. Please help me with this.

Best,

-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


Re: [PHP-DB] Need help in PHP file Management System

2009-09-17 Thread nagendra prasad
Thanks Vinay,

I think you are right. I thought about it but then server will have to
manage huge set of folders. I also thought that what if we give a unique ID
for each file for each user. So, when user wants to access his file the code
should first checks if the unique ID and the username is matched. I just
have a rough idea. If someone got my points please explain it to me. Am not
sure this may be a solution.

Guys plz help me

Best,


Re: [PHP-DB] Need help in PHP file Management System

2009-09-17 Thread nagendra prasad
Eric, I am new to file or content management. So, if possible can you send
me few scripts or some links from where I can learn more about it?


Best,


[PHP-DB] Need PHP developers in Hyderabad

2009-09-15 Thread nagendra prasad
Hi All,

I need some PHP-mysql developer who lives or can work in Hyderabad. Please
contact me ASAP. You can mail me back or you can call me on my
cell:9949817253.

Best,


-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


Re: [PHP-DB] Re: Need help-Send email

2009-09-14 Thread nagendra prasad
Hi Chris,

Thanks for the response. However I have coded the Email code with SMTP
authentication. But the problem is my mail is going to the SPAM not in the
inbox. I remember someone has said that if the code is sending the email and
if its going under SPAM folder then the code is correct but I have to work
on client filter. I don't know how? Can you or anyone help me in this.

Here is the code:

?PHP

  /* Setup your Subject and Message Body */
  $subject='Testing PHP Email';
  $body='Hi the is nagendra prasd.';

  /* Specify your SMTP Server, Port and Valid From Address */
  ini_set(SMTP,mail.localroot.200u.com);
  ini_set(smtp_port,465);
  ini_set(sendmail_from,nagendra802...@gmail.com);

  /* Additional Headers */
  $headers = Cc:Real CC Name nagendra802...@gmail.com\r\n;


  /* Try to send message and respond if it sends or fails. */
  if(mail ('ToPersonsName nagendra802...@gmail.com', $subject, $body,
$headers )){
  echo h2Your Message was sent!/h2;
  }
  else{
  echo font color='red'h2Your Message Was Not Sent!/h2/font;
  }
  exit;
?


[PHP-DB] Re: Need help-Send email

2009-09-12 Thread nagendra prasad
Hi all,

Below is the code that I have coded after replies from all of you. But
before that I want to thank all of you for your help. I have coded the email
code but still it is giving me an error. Please help me.

?php

//sending email script

$to = exam...@gmail.com;
$subject = Email from admin;

if ($_POST['submit'])
{
//get data from form

$name = $_POST['name'];
$message = $_POST['message'];
if ($name$message)
{
$namelen = 20;
$messagelen = 300;
if (strlen($name)=$namelen  strlen($message)=$messagelen)
{
  //everything is ok

  ini_set(SMTP, smtp.gmail.com);


   $to = exam...@gmail.com;

   $subject = Email from admin;
   $header = from: exam...@gmail.com;


   $body = Email from $name \n\n $message;


   mail($to,$subject,$body,$header);
   die();
}
else
die (Max length of name is $namelen, and max length for message is 300);

}
 else
 die(you must enter a name);
}

?

html
  form action='sendemail.php' method='POST'
Name: input type='text' name='name' maxlenght='20'br
Message: brtextarea name='message'/textareap
input type='submit' name='submit' value='Send an email'

  /form



/html
--

Also I have simplified the code by just using the email() function but the
problem is its sending the mail in the SPAM. The code is below :

?php
$to = exam...@gmail.com;
$subject = Test mail;
$message = Hello! This is a simple email message.;
$from = exam...@gmail.com;
$headers = From: $from;
mail($to,$subject,$message,$headers);
echo Mail Sent.;
?


Re: [PHP-DB] Re: Need help-Send email

2009-09-12 Thread nagendra prasad
Exactly, the mail-client filter is actively working for such mail. But when
I researched on Google I have found that to send an email using PHP we at
lest need a mail server domain. Also we have to set SMTP to send email to
inbox otherwise every mail-client will filter it and send it to SPAM folder.
Also, I am using WAMP to use all these codes so right now I don't have an
email server domain or something like that. Is their a way to set my PHP ini
file to use my Gmail SMTP and PORT settings so that I can at lest send
emails directly to inbox and later I will change it to some other email
client.

Thanks for the quick response :)


[PHP-DB] Need help-Send email

2009-09-11 Thread nagendra prasad
Hi All,

I want to send my sql database to the user email. But I don't have any Email
server or any email domain server. So, is their any way to use my localhost
to send emails to the user's email id. If it not possible is their a way
that I can use my Gmail to send an email through PHP?

Best,

-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


[PHP-DB] Need Help in the below script

2009-09-04 Thread nagendra prasad
Hi all,

I am working on my project. I have to create a user  regestration page and a
login page. I am done with registration page but when I tried to code the
login page its not working. Below is the code. Please take a look at script
and let me know where am I going wrong.


?php

$username=$_POST['username'];
$password=$_POST['password'];

if($username$password)
{

$connect= mysql_connect(localhost,root,) or die(couldn't connect);

mysql_select_db(phplogin) or die(no db in the list);

$query = mysql_query(SELECT * FROM users WHEER username='$username');

$numrows = mysql_num_rows($query);


if ($numrows!=0)
{
echo user dosen't exist;
while ($row = mysql_fetch_assoc($query))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
}

if ($username==$dbusername  $password==$dbpassword)
{
echo you are in;
}
else
echo incorrent username and password;


else
die(user dosent exitst);

}

else

die(please enter a username and a password);
}


?



-- 
Guru Prasad
Ubuntu Voice GTK+ Forum


Re: [PHP-DB] Need Help in the below script

2009-09-04 Thread nagendra prasad
Hay Patrick,

Thanks so much. Its really working. You have saved my life.

Best,