Re: [PHP-DB] Help with

2005-09-02 Thread Fen Lu
Martin is right... carefully~ @ $db = new mysqli('localhost', 'root', 'password', 'database_table'); On 8/30/05, Richard Hart [EMAIL PROTECTED] wrote: Hi I'm new to PHP/MySQL and wondered if anyone on this list would be kind enough to help me solve this problem. I'm trying to

Re: [PHP-DB] Storing an array on a table?

2005-09-02 Thread Fen Lu
Now you got tow ways. serialize or convernt to a string~ I think string is better~ maybe I'm getting old~ don't like new things like serialize...;-) On 9/1/05, Miguel Guirao [EMAIL PROTECTED] wrote: Hi!! I want to store an array into a field on a MySQL table, Is it posible to save it?

Re: [PHP-DB] PHP5-MySQL Not Connecting Through Socket

2005-09-02 Thread Fen Lu
how about change bind-address = 127.0.0.1 http://127.0.0.1/ to bind-address = your.real.ip.address may be it works. I got the same trouble a few days ago, but I forgot how I fixed it .. :-( some changes in my.cnf On 8/30/05, Evan J [EMAIL PROTECTED] wrote: Hi, I am running PHP 5.0.4 and

Re: [PHP-DB] PHP5-MySQL Not Connecting Through Socket

2005-09-02 Thread Evan J
Ok, someone mentioned that I did not have an appropriate permission to access mysql.sock directory. Guess what? He was right on the spot. So for whomever who reads this, the solution proposed is to `chmod 755 /usr/local/mysql/tmp' Thanks to that individual who assisted me on this. On 9/2/05, Fen

[PHP-DB] Pagination problems

2005-09-02 Thread Jenaro Centeno Gómez
Hello everybody, This is my first message to the list and as usual is to try to solve a problem. I am using PHP+IIS+SQLServer on windows platform (no choice at the moment :(...) Wel, I am trying to paginate some results this is the code: ? $conn = mssql_connect("myserver", "myuser",

Re: [PHP-DB] Pagination problems

2005-09-02 Thread Pablo M. Rivas
Hello Jenaro: First off all (i'ts not exactly your question), but i think you don't need to make this big array: $my_array[] =; while ($row = mssql_fetch_object($rs)){ $my_array[]=$row-tId; } 'cause you don't need it... you may directly do something like this: $counter=0; while

Re: [PHP-DB] Pagination problems

2005-09-02 Thread Pablo M. Rivas
upsss.. y forgot $counter++ $counter=0; while ($row=mssql_fetch_row($rs)) { if (($counter=$start) and ($counter($start+ $Page_Size)) { echo tr; //There you go: Show all fields, one to each cell echo td . implode(/tdtd,$row) . /td; echo /tr\n; } $counter++; } -- Pablo M.

Re: [PHP-DB] Pagination problems

2005-09-02 Thread Jenaro Centeno Gómez
Thanks Plabo, it worked perfectly. And I want to apollogize with all the list for the receipt confirmation, I completly forgot it. Thanks again. Pablo M. Rivas escribió: upsss.. y forgot $counter++ $counter=0; while ($row=mssql_fetch_row($rs)) { if (($counter=$start) and

Re: [PHP-DB] Pagination problems

2005-09-02 Thread Fen Lu
first~ may be you can change these: $ssql = select * from table ORDER by Name; $rs = mssql_query($ssql,$conn); $total_records = mssql_num_rows($rs); to: $ssql = SELECT COUNT(*) AS TOTAL FROM TABLE; $rs = mssql_squery($ssql,$conn); $total_records = mssql_result(TOTAL);//may not this function, I

Re: [PHP-DB] PHP5-MySQL Not Connecting Through Socket

2005-09-02 Thread Fen Lu
try #: mysqld for test? I think your mysql is not running~... I met this problem last night...hehe... On 9/2/05, Evan J [EMAIL PROTECTED] wrote: Ok, someone mentioned that I did not have an appropriate permission to access mysql.sock directory. Guess what? He was right on the spot. So for

Re: [PHP-DB] PHP5-MySQL Not Connecting Through Socket

2005-09-02 Thread Evan J
No Fen Lu, as I said in my first post, MySQL runs just fine and for some strange reason all other applications can connect through unix socket to the database except PHP scripts. But I solved the problem but chmod'ing the directory of the socket file rather the socket file itself. It had slipped