mysql - How to properly isolate an element from a SQL table in a PHP script -


I run this PHP in my PHP script:

 choose  $ sql = " As a u id id, lastpaymentdate as ul.meta_value, rd.meta_value include wp_users as noemails, on the left wp_usermeta road include rd.user_id = u.id and rd.meta_key = 'noemails' left. Ul.user_id = u.id at wp_usermeta ul and ul.meta_key = 'last payment date' WHERE u.user_email = 'testemail@domain.com' "; $ Rs = $ db- & gt; Execute ($ sql);  

Here is the data that will output it if I run it in an SQL console:

  + ------ + ---- - ------------ + ---------- + | ID | Last payment date | Nomiles | + ------ + ----------------- + ---------- + 2523 2013-10-30 0   

I need to get the lastpaymentdate (2013-10-30) array $ lastRenewalDateParts

What I've come up with.

  $ final reinvolved pars = explosion ('-', $ rs-> data [0] [1]);  

However, this is not working properly. This is giving me an empty array where I can be wrong.

Edit:

  mysqli_driver_ResultSet object ([connectionId] => mysqli item ([ : Here ($ R) is the result of print_r? Affected_rows] => 1 [client_info] => 5.5.30 [client_version] => 50530 [connect_errno] => 0 [connect_error] = & gt; ; [Errno] = & gt; 0 [Error] => [field_count] => 3 [host_info] => Local Host via Unix Socket [Info] => [insert_id] = & Gt; 0 [server_info] => 5.5.38-35.2 [server_version] => 50,538 [State] => uptime: 2030485 threads: 19 questions: 2452324326 Slow queries: 6246 Volume: 22,784,920 Flush Table: 1 Open Table: Second Average 16800 Query: 1207.752 [SQLSTATE] => 00000 [protocol_version] => 10 [thread_id] = & gt; 44573449 [warning_count] => 0 ) [Farms = Object ([current_field] = & gt; 0 [field_count] = & gt; 3 [length] = & gt; Array ([0] = & gt; 4 [1] => 10 [2] = & gt; 1) [num_rows] = & gt; 1 [type] => 0) [_currentRow] = & gt; 0 [_numOfRows] = & gt; 1 [_numOfFields] = & gt; 3 [fetchMode] = & gt; 1 [EOF] = & gt; [Record] = & gt; I went to the wrong way to access data. I was wrong about accessing data. My basic attempt was getting empty:  
  copy $ rs-> Data [0] [1];  

The correct way to access the date fields:

$ rs- & gt; Field echo [last payment date];

Thanksgiving!


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -